ASP4::ErrorHandler::Remote - Send your errors someplace else via http.
In your asp4-config.json:
asp4-config.json
... "errors": { "error_handler": "ASP4::ErrorHandler::Remote", "post_errors_to": "http://errors.ohno.com/post/errors/here/" }, ...
This class provides a default error handler which does the following:
1) Makes a simple HTML page and prints it to the browser, telling the user that an error has just occurred.
2) Sends an error notification to the web address specified in the config.
The data contained within the POST will match the public properties of ASP4::Error, like this:
$VAR1 = { 'remote_addr' => '127.0.0.1', 'request_uri' => '/', 'user_agent' => 'test-useragent v2.0', 'file' => '/home/john/Projects/myapp/www/htdocs/index.asp', 'session_data' => '{}', 'message' => 'A fake error has occurred', 'http_code' => '500', 'stacktrace' => 'A fake error has occurred at /tmp/PAGE_CACHE/TSR_WWW/__index_asp.pm line 2. ', 'domain' => 'www.tsr.local', 'form_data' => '{}', 'http_referer' => '', 'code' => 'line 1: <h1>Hello, world!</h1> line 2: <% line 3: die "A fake error has occurred"; line 4: %> ', 'line' => '2' };
Sends the error data to the web address specified in <$Config-errors->post_errors_to>>.
<$Config-
The field names and values will correspond to the properties of an ASP4::Error object.
ASP4::Error
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.
John Drago <jdrago_999@yahoo.com>
Copyright 2008 John Drago. All rights reserved.
This software is Free software and is licensed under the same terms as perl itself.
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.