Data::Format::Pretty::Perl - Pretty-print data structure as Perl code
version 0.05
use Data::Format::Pretty::Perl qw(format_pretty); print format_pretty($data);
Some example output:
format_pretty({a=>1, b=>2})
{ a => 1, b => 2 }
This module uses Data::Dump or Data::Dump::Color to format data as Perl code.
Return formatted data structure as Perl code. Options:
color => BOOL
Whether to enable coloring. The default is the enable only when running interactively. Currently also enable line numbering.
linum => BOOL (default: 0)
Whether to add line numbers.
Set color option (if unset).
color
Set linum option (if unset).
linum
Data::Format::Pretty
Please visit the project's homepage at https://metacpan.org/release/Data-Format-Pretty-Perl.
Source repository is at https://github.com/sharyanto/perl-Data-Format-Pretty-Perl.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Format-Pretty-Perl
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Steven Haryanto <stevenharyanto@gmail.com>
This software is copyright (c) 2014 by Steven Haryanto.
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 Data::Format::Pretty::Perl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Format::Pretty::Perl
CPAN shell
perl -MCPAN -e shell install Data::Format::Pretty::Perl
For more information on module installation, please visit the detailed CPAN module installation guide.