Debian Codegraph @

README

raw
1 NAME
2
3 XXX - See Your Data in the Nude
4
5 VERSION
6
7 This document describes XXX version 0.38.
8
9 SYNOPSIS
10
11 use XXX;
12 XXX my $dog = Dog->new({has => ['fleas', 'style']});
13 my $dog = XXX Dog->new({has => ['fleas', 'style']});
14 my $dog = Dog->new(XXX {has => ['fleas', 'style']});
15 my $dog = Dog->new({XXX has => ['fleas', 'style']});
16 my $dog = Dog->new({has => XXX ['fleas', 'style']});
17 my $dog = Dog->new({has => [XXX 'fleas', 'style']});
18
19 DESCRIPTION
20
21 XXX.pm exports a function called XXX that you can put just about
22 anywhere in your Perl code to make it die with a YAML dump of the
23 arguments to its right.
24
25 The charm of XXX-debugging is that it is easy to type, rarely requires
26 parens and stands out visually so that you remember to remove it.
27
28 XXX.pm also exports WWW, YYY and ZZZ which do similar debugging things.
29
30 FUNCTIONS
31
32 WWW
33
34 WWW will warn a dump of its arguments, and then return the original
35 arguments. This means you can stick it in the middle of expressions.
36
37 NOTE: If you use WWW with Test::More, it will diag() rather than
38 warn().
39
40 mnemonic: W for warn
41
42 XXX
43
44 XXX will die with a dump of its arguments.
45
46 mnemonic: XXX == Death, Nudity
47
48 YYY
49
50 YYY will print a dump of its arguments, and then return the original
51 arguments. This means you can stick it in the middle of expressions.
52
53 NOTE: If you use YYY with Test::More, it will note() rather than
54 print().
55
56 mnemonic: YYY == Why Why Why??? or YAML YAML YAML
57
58 ZZZ
59
60 ZZZ will Carp::confess a dump of its arguments.
61
62 mnemonic: You should confess all your sins before you sleep. zzzzzzzz
63
64 DDD
65
66 DDD will start an interactive debugger session using the Enbugger
67 module. By default it will use the Perl debugger, but you can switch
68 to the fancier Devel::Trepan debugger by setting the enviroment
69 variable PERL_XXX_DEBUGGER=trepan.
70
71 In the debugger session you will be able to both read and modify all
72 variables including lexical variables.
73
74 mnemonic: Debug, Debug, Debug!
75
76 USE XXX WITHOUT USE XXX;
77
78 If you export PERL5OPT='-MXXX=global' in your shell environment, then
79 XXX will be always be loaded, and all the functions will also be
80 exported into the main namespace. That means you can call XXX from any
81 package with ::XXX (since :: is a synonym for main::).
82
83 Also XXX will be exported as $::XXX which you can use like this:
84
85 $self->foo->$::WWW->bar;
86
87 This will warn a YAML dump of $self, returning $self so that bar will
88 be called correctly.
89
90 CONFIGURATION
91
92 By default, XXX uses YAML::PP to dump your data. You can change this
93 like so:
94
95 use XXX -with => 'Data::Dumper';
96 use XXX -with => 'Data::Dump';
97 use XXX -with => 'Data::Dump::Color';
98 use XXX -with => 'YAML';
99 use XXX -with => 'YAML::XS';
100 use XXX -with => 'YAML::SomeOtherYamlModule';
101 use XXX -with => 'JSON::Color';
102 use XXX -with => 'JSON::SomeOtherJsonModule';
103
104 You can also use the environment variable PERL_XXX_DUMPER to set the
105 module, for example;
106
107 PERL_XXX_DUMPER=JSON::Color perl script.pl
108 PERL_XXX_DUMPER=YAML::PP::Highlight perl script.pl
109
110 Only modules with names beginning with 'YAML' or 'JSON', and the
111 Data::Dumper, Data::Dump, and Data::Dump::Color modules are supported.
112
113 If you need to load XXX with require, you can set the dumper module
114 with the $XXX::DumpModule global variable.
115
116 require XXX;
117 $XXX::DumpModule = 'YAML::Syck';
118
119 XXX::XXX($variable);
120
121 STACK TRACE LEVEL
122
123 If you call a debugging function that calls XXX for you, XXX will print
124 the wrong file and line number. To force XXX to skip a package in the
125 call stack, just define the XXX_skip constant like this:
126
127 package MyDebugger;
128 use constant XXX_skip => 1;
129 sub debug {
130 require XXX;
131 XXX::XXX(@_);
132 }
133
134 Now calls to MyDebugger::debug will print the file name you called it
135 from, not from MyDebugger itself.
136
137 AUTHOR
138
139 Ingy döt Net <[email protected]>
140
141 COPYRIGHT AND LICENSE
142
143 Copyright 2006-2021. Ingy döt Net.
144
145 This program is free software; you can redistribute it and/or modify it
146 under the same terms as Perl itself.
147
148 See http://www.perl.com/perl/misc/Artistic.html
149