Eidolon::Debug - Eidolon debugging facility.
In CGI/FCGI gateway of your application (index.cgi/index.fcgi) write:
index.cgi
index.fcgi
use Eidolon::Debug;
The Eidolon::Debug package provides an easy way to avoid a confusing Internal Server Error web server message. It sends HTTP header before displaying an error, so you don't need to dig web-server's log to find the cause of the error anymore. Obviously, it will do nothing if error is in your web-server configuration, so if Internal Server Error message still remains, check your web-server configuration. Also, this package displays a stack trace when application dies. It is very useful in application development, so Eidolon::Debug is included in applications by default.
This package doesn't depend on any other Eidolon package, so you can use it outside Eidolon applications too.
While used, Eidolon::Debug hooks global die and warn subroutines, so be careful using other packages, that modify or depend on $SIG{"__DIE__"} and $SIG{"__WARN__"} handlers.
die
warn
$SIG{"__DIE__"}
$SIG{"__WARN__"}
Start a javascript debugging console. Prints a minimal HTTP header and javascript code, so further error and warning messages could be displayed in nice-looking form.
Get subroutine call stack. Returns reference to array of hashrefs, each hashref stands for one level of the call stack. This hashref contains the following data:
package
Package name, where error has been occured.
file
File name, where error has been occured.
line
Line number, which caused program to die.
sub
Subroutine name, where error has been occured.
Prints the call stack in nice preformatted table. $stack - reference to array of call stack hashrefs (result, returned by get_stack() subroutine).
$stack
get_stack()
Custom warning handler. $message - warning message to be displayed.
$message
Custom error handler. $message - error message to be displayed.
Eidolon, Eidolon::Application
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Anton Belousov, <abel@cpan.org>
Copyright (c) 2009, Atma 7, http://www.atma7.com
To install Eidolon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Eidolon
CPAN shell
perl -MCPAN -e shell install Eidolon
For more information on module installation, please visit the detailed CPAN module installation guide.