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

NAME

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

VERSION

9       version 2.54
10

SYNOPSIS

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

DESCRIPTION

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

SUBROUTINES

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

LICENSE

71       This module may distributed under the same terms as Perl itself.
72

AUTHORS

74       Paul Seamons <perl at seamons dot com>
75
76
77
78perl v5.36.0                      2023-01-20                  CGI::Ex::Dump(3)
Impressum