LEGAL

#===========================================================================

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.

#===========================================================================

NAME

CGI::Lazy::Utility::Debug

DESCRIPTION

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

SYNOPSIS

        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

METHODS

prints an html formatted page listing all cookies.

dump ( output )

Outputs either a value, or a dump of a reference to the browser.

ref

String consisiting of message to dump, or reference

edump ( ref, message, filename )

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.

output

string or reference to dump into external log file

message

a message to dump with the dump, if you like

edumpreplace ( output, message )

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

output

string or reference to dump into external log file

message

a message to dump with the dump, if you like

eparam ( args )

Dumps cgi parameters to filename. Will also print any arguments passed, or dumps of args, if the args are references.

args

list of additional stuff to be printed out

param (args)

Writes cgi parameters to browser

args

list of addional stuff to be printed. If references are passed, prints html formatted dumps of ref contents.

env

writes ENV variables to browser

new

constructor

timestamp

creates a formatted timestamp string for the log