hi friends,
i'm new to unix and straight away i had to start with the script files.
I've a script file which gets called from a menu item on a GUI.
This script file again calls .awk file, in performing some tasks , which also generates certain files.
I modified the files to generate some... (1 Reply)
Hello Friends,
I have bash script on unix server which i want to call from windows server. Basically i want a command line which will call this script on unix server. Any one has any idea regarding this?
Help really appreciated!!
Thanks,
Roshni. (1 Reply)
Hi,
I have a query ..
i have 2 scripts say 1.sh and 2.sh
1.sh contains many functions written using shell scripts.
2.sh is a script which needs to call the functions definded in 1.sh
function calls are with arguments.
Can some one tell me how to call the functions from 2.sh?
Thanks in... (6 Replies)
Hello gurus,
I have three korn shell script 3.1, 3.2, 3.3. I would like to call three shell script in one shell script.
i m looking for something like this
call 3.1;
If 3.1 = "complete" then
call 3.2;
if 3.2 = ''COMPlete" then
call 3.3;
else
exit
The... (1 Reply)
hello everyone
i am beginner on shell scripting .and i am working on my project work on ad hoc network
i wrote a batch (.sh) to do a looping and execute a tcl script i wrote before in each iteration ..but i got this problem "
syntax error near unexpected token `('... (1 Reply)
Hi,
pls, tell me how to use syncsort in shell script? if i have to sort a file, what are the syncsort commands i hav to use ? say abc.dat is my file and dt, Id are my key columns. (0 Replies)
Can someone let me know how could I achieve this
In one of per script I am calling the shell script but I need to so one thing that is one shell script call I need to pass pne argument.In below code I am calling my ftp script but here I want to pass one argument so how could I do this (e.g:... (5 Replies)
Hi,
I am working on a sever A.
I want to write a perl script to execute a shell script persent on the server B.
please help me in this.
thanks in advance. (3 Replies)
I am getting the following error while passing parameter to a shell script called within awk script. Any idea what's causing this issue and how to ix it ? Thanks
sh: -c: line 0: syntax error near unexpected token `newline'
sh: -c: line 0: `./billdatecalc.sh ... (10 Replies)
Hi ,
i am invoking webservice from shell script and it is getting hitting server but unable to get the param values.
here my script like this:
s is variable
s=test
curl --data "param=$s" url
now hittng server , but param is empty.
just i want param value as string even I want for... (0 Replies)
Discussion started by: kk123
0 Replies
LEARN ABOUT DEBIAN
plack::middleware::httpexceptions
Plack::Middleware::HTTPExceptions(3pm) User Contributed Perl Documentation Plack::Middleware::HTTPExceptions(3pm)NAME
Plack::Middleware::HTTPExceptions - Catch HTTP exceptions
SYNOPSIS
use HTTP::Exception;
my $app = sub {
# ...
HTTP::Exception::500->throw;
};
builder {
enable "HTTPExceptions", rethrow => 1;
$app;
};
DESCRIPTION
Plack::Middleware::HTTPExceptions is a PSGI middleware component to catch exceptions from applications that can be translated into HTTP
status codes.
Your application is supposed to throw an object that implements a "code" method which returns the HTTP status code, such as 501 or 404.
This middleware catches them and creates a valid response out of the code. If the "code" method returns a code that is not an HTTP redirect
or error code (3xx, 4xx, or 5xx), the exception will be rethrown.
The exception object may also implement "as_string" or overload stringification to represent the text of the error. The text defaults to
the status message of the error code, such as Service Unavailable for 503.
Finally, the exception object may implement "as_psgi", and the result of this will be returned directly as the PSGI response.
If the code is in the 3xx range and the exception implements the 'location' method (HTTP::Exception::3xx does), the Location header will be
set in the response, so you can do redirects this way.
There are CPAN modules HTTP::Exception and HTTP::Throwable, and they are perfect to throw from your application to let this middleware
catch and display, but you can also implement your own exception class to throw.
If the thrown exception is not an object that implements either a "code" or an "as_psgi" method, a 500 error will be returned.
Alternatively, you can pass a true value for the "rethrow" parameter for this middleware, and the exception will instead be rethrown. This
is enabled by default when "PLACK_ENV" is set to "development", so that the StackTrace middleware can catch it instead.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
paste.httpexceptions HTTP::Exception HTTP::Throwable
perl v5.14.2 2011-06-22 Plack::Middleware::HTTPExceptions(3pm)