CGI::Ex::Dump - A debug utility
use CGI::Ex::Dump; # auto imports dex, dex_warn, dex_text and others my $hash = { foo => ['a', 'b', 'Foo','a', 'b', 'Foo','a', 'b', 'Foo','a'], }; dex $hash; # or dex_warn $hash; dex; dex "hi"; dex $hash, "hi", $hash; dex \@INC; # print to STDOUT, or format for web if $ENV{REQUEST_METHOD} dex_warn \@INC; # same as dex but to STDOUT print FOO dex_text \@INC; # same as dex but return dump # ALSO # use CGI::Ex::Dump qw(debug); debug; # same as dex
Uses the base Data::Dumper of the distribution and gives it nicer formatting - and allows for calling just about anytime during execution.
Calling &CGI::Ex::set_deparse() will allow for dumped output of subroutines if available.
perl -e 'use CGI::Ex::Dump; dex "foo";'
See also Data::Dumper.
Setting any of the Data::Dumper globals will alter the output.
Paul Seamons <perlspam at seamons dot com>
To install CGI::Ex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CGI::Ex
CPAN shell
perl -MCPAN -e shell install CGI::Ex
For more information on module installation, please visit the detailed CPAN module installation guide.