GitXplorerGitXplorer
i

xxx-pm

public
17 stars
5 forks
2 issues

Commits

List of commits on branch master.
Unverified
b2f1f8eec92399c09203b05cea7a90eefc281c5f

CPAN Release 0.38

iingydotnet committed 4 years ago
Unverified
8580305811f9d0a78c42da6b1fb3fde418913ee3

CPAN Release 0.37

iingydotnet committed 4 years ago
Unverified
68c67b9cbbec96b97fd21b5fbf42e68373c84718

CPAN Release 0.36

iingydotnet committed 4 years ago
Unverified
80b5ff340927fd2548afcbdabc1576eebdd84d15

CPAN Release 0.35

iingydotnet committed 5 years ago
Unverified
e33dc568d1667b1ac3131ceb13821fd26cfbba9c

Add Perl schema to YAML::PP dumping

iingydotnet committed 5 years ago
Unverified
a437ad03442eff4eb7a8f9c670bc618954298ad5

CPAN Release 0.34

iingydotnet committed 5 years ago

README

The README file for this repository.

=pod

=for comment DO NOT EDIT. This Pod was generated by Swim v0.1.48. See http://github.com/ingydotnet/swim-pm#readme

=encoding utf8

=head1 Name

XXX - See Your Data in the Nude

=head1 Version

This document describes L version B<0.38>.

=for html xxx-pm xxx-pm

=head1 Synopsis

use 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']});

=head1 Description

C<XXX.pm> exports a function called C 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.

C<XXX.pm> also exports C, C and C which do similar debugging things.

=head1 Functions

=over

=item C

C will warn a dump of its arguments, and then return the original arguments. This means you can stick it in the middle of expressions.

NOTE: If you use WWW with Test::More, it will C<diag()> rather than C<warn()>.

mnemonic: W for warn

=item C

C will die with a dump of its arguments.

mnemonic: XXX == Death, Nudity

=item C

C will print a dump of its arguments, and then return the original arguments. This means you can stick it in the middle of expressions.

NOTE: If you use YYY with Test::More, it will C<note()> rather than C<print()>.

mnemonic: YYY == Why Why Why??? or YAML YAML YAML

=item C

C will Carp::confess a dump of its arguments.

mnemonic: You should confess all your sins before you sleep. zzzzzzzz

=item C

C will start an interactive debugger session using the C module. By default it will use the Perl debugger, but you can switch to the fancier Devel::Trepan debugger by setting the enviroment variable C<PERL_XXX_DEBUGGER=trepan>.

In the debugger session you will be able to both read and modify all variables including lexical variables.

mnemonic: Debug, Debug, Debug!

=back

=head1 Use XXX without C<use XXX;>

If you C in your shell environment, then C will be always be loaded, and all the functions will also be exported into the C

namespace. That means you can call C from any package with C<::XXX> (since C<::> is a synonym for Cmain::).

Also C will be exported as C<$::XXX> which you can use like this:

$self->foo->$::WWW->bar;

This will warn a YAML dump of C<$self>, returning C<$self> so that C will be called correctly.

=head1 Configuration

By default, C 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 C<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 C, you can set the dumper module with the C<$XXX::DumpModule> global variable.

require XXX;
$XXX::DumpModule = 'YAML::Syck';

XXX::XXX($variable);

=head1 Stack Trace Level

If you call a debugging function that calls C for you, C will print the wrong file and line number. To force C to skip a package in the call stack, just define the C<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.

=head1 Author

Ingy döt Net ingy@cpan.org

=head1 Copyright and License

Copyright 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 Lhttp://www.perl.com/perl/misc/Artistic.html

=cut