ASP4::Error - Representation of a server-side error
use ASP4::Error; # Pass in the $@ value after something dies or confesses: eval { die "Foo" }; if( $@ ) { my $error = ASP4::Error->new( $@ ) } # Pass in your own info: unless( $something ) { my $error = ASP4::Error->new( message => "If can, can. If no can, no can!" ); }
ASP4 provides a simple means of dealing with errors. It emails them, by default, to an email address you specify.
Sometimes that is not convenient. Maybe you want to do something special with the error - like log it someplace special.
ASP4::Error is a simple representation of a server-side error.
<$Config-errors->domain>> or $ENV{HTTP_HOST}
<$Config-
$ENV{HTTP_HOST}
$ENV{REQUEST_URI}
The name of the file in which the error occurred. This is gleaned from $@ unless file is passed to the constructor.
$@
file
The line number within the file that the error occurred. This is gleaned from $@ unless line is passed to the constructor.
line
A string. Includes the 5 lines of code before and after the line of code where the error occurred.
Defaults to the first part of $@ unless otherwise specified.
A string - defaults to the value of $@.
JSON-encoded $Form object.
$Form
JSON-encoded $Session object.
$Session
Default value is $ENV{HTTP_REFERER}
$ENV{HTTP_REFERER}
Default value is $ENV{HTTP_USER_AGENT}
$ENV{HTTP_USER_AGENT}
The current value of <$Response-Status>>
<$Response-
Default value is $ENV{REMOTE_ADDR} -- the IP address of the remote client.
$ENV{REMOTE_ADDR}
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4 to submit bug reports.
Please visit the ASP4 homepage at http://0x31337.org/code/ to see examples of ASP4 in action.
To install ASP4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ASP4
CPAN shell
perl -MCPAN -e shell install ASP4
For more information on module installation, please visit the detailed CPAN module installation guide.