|
NAMEXXX - See Your Data in the NudeVERSIONThis document describes XXX version 0.38.SYNOPSISuse XXX; XXX my $dog = Dog->new({has => ['fleas', 'style']}); my $dog = XXX Dog->new({has => ['fleas', 'style']}); my $dog = Dog->new(XXX {has => ['fleas', 'style']}); my $dog = Dog->new({XXX has => ['fleas', 'style']}); my $dog = Dog->new({has => XXX ['fleas', 'style']}); my $dog = Dog->new({has => [XXX 'fleas', 'style']}); DESCRIPTION"XXX.pm" exports a function called "XXX" that you can put just about anywhere in your Perl code to make it die with a YAML dump of the arguments to its right.The charm of XXX-debugging is that it is easy to type, rarely requires parens and stands out visually so that you remember to remove it. "XXX.pm" also exports "WWW", "YYY" and "ZZZ" which do similar debugging things. FUNCTIONS
USE XXX WITHOUT "USE XXX;"If you "export PERL5OPT='-MXXX=global'" in your shell environment, then "XXX" will be always be loaded, and all the functions will also be exported into the "main" namespace. That means you can call "XXX" from any package with "::XXX" (since "::" is a synonym for "main::").Also "XXX" will be exported as $::XXX which you can use like this: $self->foo->$::WWW->bar; This will warn a YAML dump of $self, returning $self so that "bar" will be called correctly. CONFIGURATIONBy default, "XXX" uses YAML::PP to dump your data. You can change this like so:use XXX -with => 'Data::Dumper'; use XXX -with => 'Data::Dump'; use XXX -with => 'Data::Dump::Color'; use XXX -with => 'YAML'; use XXX -with => 'YAML::XS'; use XXX -with => 'YAML::SomeOtherYamlModule'; use XXX -with => 'JSON::Color'; use XXX -with => 'JSON::SomeOtherJsonModule'; You can also use the environment variable "PERL_XXX_DUMPER" to set the module, for example; PERL_XXX_DUMPER=JSON::Color perl script.pl PERL_XXX_DUMPER=YAML::PP::Highlight perl script.pl Only modules with names beginning with 'YAML' or 'JSON', and the Data::Dumper, Data::Dump, and Data::Dump::Color modules are supported. If you need to load XXX with "require", you can set the dumper module with the $XXX::DumpModule global variable. require XXX; $XXX::DumpModule = 'YAML::Syck'; XXX::XXX($variable); STACK TRACE LEVELIf you call a debugging function that calls "XXX" for you, "XXX" will print the wrong file and line number. To force "XXX" to skip a package in the call stack, just define the "XXX_skip" constant like this:package MyDebugger; use constant XXX_skip => 1; sub debug { require XXX; XXX::XXX(@_); } Now calls to MyDebugger::debug will print the file name you called it from, not from MyDebugger itself. AUTHORIngy döt Net <ingy@cpan.org>COPYRIGHT AND LICENSECopyright 2006-2021. Ingy döt Net.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html>
Visit the GSP FreeBSD Man Page Interface. |