1CGI::Ex::Dump(3)      User Contributed Perl Documentation     CGI::Ex::Dump(3)
2
3
4

NAME

6       CGI::Ex::Dump - A debug utility
7

SYNOPSIS

9         use CGI::Ex::Dump; # auto imports dex, dex_warn, dex_text and others
10
11         my $hash = {
12           foo => ['a', 'b', 'Foo','a', 'b', 'Foo','a', 'b', 'Foo','a'],
13         };
14
15         dex $hash; # or dex_warn $hash;
16
17         dex;
18
19         dex "hi";
20
21         dex $hash, "hi", $hash;
22
23         dex \@INC; # print to STDOUT, or format for web if $ENV{REQUEST_METHOD}
24
25         dex_warn \@INC;  # same as dex but to STDOUT
26
27         print FOO dex_text \@INC; # same as dex but return dump
28
29         # ALSO #
30
31         use CGI::Ex::Dump qw(debug);
32
33         debug; # same as dex
34

DESCRIPTION

36       Uses the base Data::Dumper of the distribution and gives it nicer
37       formatting - and allows for calling just about anytime during
38       execution.
39
40       Calling &CGI::Ex::set_deparse() will allow for dumped output of
41       subroutines if available.
42
43       perl -e 'use CGI::Ex::Dump;  dex "foo";'
44
45       See also Data::Dumper.
46
47       Setting any of the Data::Dumper globals will alter the output.
48

SUBROUTINES

50       "dex", "debug"
51           Prints out pretty output to STDOUT.  Formatted for the web if on
52           the web.
53
54       "dex_warn"
55           Prints to STDERR.
56
57       "dex_text"
58           Return the text as a scalar.
59
60       "ctrace"
61           Caller trace returned as an arrayref.  Suitable for use like "debug
62           ctrace".  This does require at least perl 5.8.0's Carp.
63
64       "on", "off"
65           Turns calls to routines on or off.  Default is to be on.
66

LICENSE

68       This module may distributed under the same terms as Perl itself.
69

AUTHORS

71       Paul Seamons <perl at seamons dot com>
72
73
74
75perl v5.12.1                      2010-02-25                  CGI::Ex::Dump(3)
Impressum