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 for‐
37       matting - and allows for calling just about anytime during execution.
38
39       Calling &CGI::Ex::set_deparse() will allow for dumped output of subrou‐
40       tines if available.
41
42       perl -e 'use CGI::Ex::Dump;  dex "foo";'
43
44       See also Data::Dumper.
45
46       Setting any of the Data::Dumper globals will alter the output.
47

SUBROUTINES

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

LICENSE

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

AUTHORS

70       Paul Seamons <perl at seamons dot com>
71
72
73
74perl v5.8.8                       2007-10-18                  CGI::Ex::Dump(3)
Impressum