#===========================================================================
Copyright (C) 2008 by Nik Ogura. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Bug reports and comments to nik.ogura@gmail.com.
CGI::Lazy::Utility::Debug
CGI::Lazy::Utility::Debug is a bunch of useful CGI debugging functions that I got tired of writing by hand when I needed to figure out what wierdness is happening in a script
use CGI::Lazy; my $q = CGI::Lazy->new('/path/to/config/file'); my $t = $q->utility->debug; $t->param(); #dumps html formatted CGI parameters to browser. $t->env(); #dumps html formatted %ENV to browser. $t->dump($ref, "some string"); #dumps html formatted output from Data::Dumper (if ref) or string (if scalar) to browser. $t->cookie(); #dumps info regarding cookies to browser. $t->edump($ref, "some string"); #dumps to external file, appending at each subsequent call. $t->edumpreplace($ref); #dumps to external file, overwriting at each call
prints an html formatted page listing all cookies.
Outputs either a value, or a dump of a reference to the browser.
String consisiting of message to dump, or reference
Outputs either a value, or a dump of a reference to file specified by the 'debugfile' key in the CGI::Lazy config file. If that file isn't specified, dumps to /tmp/CGILazy.log. Appends to dump file.
string or reference to dump into external log file
a message to dump with the dump, if you like
Outputs either a value, or a dump of a reference to file specified by the 'debugfile' key in the CGI::Lazy config file. If that file isn't specified, dumps to /tmp/CGILazy.log. Replaces dump file
Dumps cgi parameters to filename. Will also print any arguments passed, or dumps of args, if the args are references.
list of additional stuff to be printed out
Writes cgi parameters to browser
list of addional stuff to be printed. If references are passed, prints html formatted dumps of ref contents.
writes ENV variables to browser
constructor
creates a formatted timestamp string for the log
To install CGI::Lazy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Lazy
CPAN shell
perl -MCPAN -e shell install CGI::Lazy
For more information on module installation, please visit the detailed CPAN module installation guide.