YAML::PP::Highlight - Syntax highlighting utilities
use YAML::PP::Highlight qw/ Dump /; my $highlighted = Dump $data;
use YAML::PP::Highlight qw/ Dump /; my $highlighted = Dump $data; my $highlighted = Dump @docs;
It will dump the given data, and then parse it again to create tokens, which are then highlighted with ansi colors.
The return value is ansi colored YAML.
To install YAML::PP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm YAML::PP
CPAN shell
perl -MCPAN -e shell install YAML::PP
For more information on module installation, please visit the detailed CPAN module installation guide.