Devel-REPL-Plugin-DataPrinter
view release on metacpan or search on metacpan
ExtUtils::MakeMaker: 6.30
dynamic_config: 0
generated_by: 'Dist::Zilla version 4.300030, CPAN::Meta::Converter version 2.120921'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: Devel-REPL-Plugin-DataPrinter
requires:
Data::Printer: 0
Devel::REPL::Plugin: 0
strict: 0
warnings: 0
resources:
homepage: https://github.com/garu/Devel-REPL-Plugin-DataPrinter
repository: https://github.com/garu/Devel-REPL-Plugin-DataPrinter.git
version: 0.007
Makefile.PL view on Meta::CPAN
"FindBin" => 0,
"Test::More" => 0,
"overload" => 0
},
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => "6.30"
},
"DISTNAME" => "Devel-REPL-Plugin-DataPrinter",
"EXE_FILES" => [],
"LICENSE" => "perl",
"NAME" => "Devel::REPL::Plugin::DataPrinter",
"PREREQ_PM" => {
"Data::Printer" => 0,
"Devel::REPL::Plugin" => 0,
"strict" => 0,
"warnings" => 0
},
"VERSION" => "0.007",
"test" => {
"TESTS" => "t/*.t"
}
);
lib/Devel/REPL/Plugin/DataPrinter.pm view on Meta::CPAN
package Devel::REPL::Plugin::DataPrinter;
{
$Devel::REPL::Plugin::DataPrinter::VERSION = '0.007';
}
# ABSTRACT: Format REPL results with Data::Printer
use strict;
use warnings;
use Devel::REPL::Plugin;
use Data::Printer colored => 1, use_prototypes => 1;
has dataprinter_config => (
is => 'rw',
default => sub { {} },
);
around 'format_result' => sub {
my $orig = shift;
my $self = shift;
lib/Devel/REPL/Plugin/DataPrinter.pm view on Meta::CPAN
1;
__END__
=pod
=head1 NAME
Devel::REPL::Plugin::DataPrinter - Format REPL results with Data::Printer
=head1 VERSION
version 0.007
=head1 SYNOPSIS
In your re.pl config file (usually C<< ~/.re.pl/repl.rc >>):
load_plugin('DataPrinter');
lib/Devel/REPL/Plugin/DataPrinter.pm view on Meta::CPAN
caller_info => 0,
});
See L<Data::Printer/Customization> for configuration options; the values
provided to C<dataprinter_config> override your .dataprinterrc. C<colored> is
on by default, and the only settings you may not override are
C<use_prototypes> and C<return_value>. Note that C<dataprinter_config> only
applies to the printing that the REPL does; if you invoke C<p()> in your REPL
session yourself, these settings are B<not> applied.
=head2 Devel::REPL::Plugin::DataPrinter specific customization
=over
=item stringify
If the reference being printed has a stringification overloaded method and you
do not want to use it by default, you can configure an override by setting the
package to zero:
$_REPL->dataprinter_config({
stringify => {
'DateTime' => 0,
},
});
=back
=head1 SEE ALSO
* L<Devel::REPL>
* L<Devel::REPL::Plugin::DDS>
* L<Data::Printer>
=head1 AUTHOR
Breno G. de Oliveira <garu@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Breno G. de Oliveira.
#!/usr/bin/env perl
use Test::More tests => 4;
use_ok('Devel::REPL');
use_ok('Devel::REPL::Plugin::DataPrinter');
my $repl;
ok($repl = Devel::REPL->new, 'new Devel::REPL');
ok($repl->load_plugin('DataPrinter'), 'loaded DataPrinter plugin');
( run in 0.283 second using v1.01-cache-2.11-cpan-4ee56698ea0 )