Devel::REPL::Plugin::DataPrinter - Format REPL results with Data::Printer
version 0.007
In your re.pl config file (usually ~/.re.pl/repl.rc):
~/.re.pl/repl.rc
load_plugin('DataPrinter');
That's about it. Your re.pl should now give you nicer outputs :)
This plugin also provides a method dataprinter_config, which can be used to configure Data::Printer for use in Devel::REPL. For example, if you don't care for colored output:
dataprinter_config
$_REPL->dataprinter_config({ colored => 0, });
Or if you ask for caller_info in your .dataprinter file, but don't want it in the REPL:
$_REPL->dataprinter_config({ caller_info => 0, });
See "Customization" in Data::Printer for configuration options; the values provided to dataprinter_config override your .dataprinterrc. colored is on by default, and the only settings you may not override are use_prototypes and return_value. Note that dataprinter_config only applies to the printing that the REPL does; if you invoke p() in your REPL session yourself, these settings are not applied.
colored
use_prototypes
return_value
p()
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, }, });
* Devel::REPL * Devel::REPL::Plugin::DDS * Data::Printer
Breno G. de Oliveira <garu@cpan.org>
This software is copyright (c) 2011 by Breno G. de Oliveira.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Devel::REPL::Plugin::DataPrinter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::REPL::Plugin::DataPrinter
CPAN shell
perl -MCPAN -e shell install Devel::REPL::Plugin::DataPrinter
For more information on module installation, please visit the detailed CPAN module installation guide.