perlhl - command-line syntax highlighter for Perl source code
version 0.007
perlhl < bin/perlhl | less -R perlhl bin/perlhl lib/App/perlhl.pm
perlhl is a command line syntax highlighter for Perl code.
Opens this man page and exits.
Prints the version of this program and supporting libraries.
Output HMTL fragment instead of ANSI terminal escapes.
Provide input on stdin to perlhl to highlight it to stdout with ANSI colour escapes.
perlhl < script.pl
It is not recommended to provide multiple files on stdout, since they'll be concatenated. This makes it impossible to know where one ends and the next begins, and will yield inferior syntax highlighting results. To highlight multiple files, provide filenames on the command line:
perlhl lib/My/Module.pm lib/My/Module/Again.pm
Provide the --html option to output an HTML fragment. In the future, this option might print a whole valid document.
Syntax::Highlight::Perl::Improved
Term::ANSIColor
Text::Highlight
There is a one-liner that can do something comparable:
perl -MText::Highlight -E 'my $h = Text::Highlight->new(ansi => 1); > my $text = do { local $/; open my $fh, "<", $ARGV[0]; <$fh> }; > say $h->highlight("Perl", $text); > ' bin/perlhl
The project homepage is http://metacpan.org/release/App-perlhl/.
The latest version of this module is available from the Comprehensive Perl Archive Network (CPAN). Visit http://www.perl.com/CPAN/ to find a CPAN site near you, or see https://metacpan.org/module/App::perlhl/.
The development version is on github at http://github.com/doherty/App-perlhl and may be cloned from git://github.com/doherty/App-perlhl.git
You can make new bug reports, and view existing ones, through the web interface at https://github.com/doherty/App-perlhl/issues.
Mike Doherty <doherty@cpan.org>
This software is copyright (c) 2011 by Mike Doherty.
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 App::perlhl, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::perlhl
CPAN shell
perl -MCPAN -e shell install App::perlhl
For more information on module installation, please visit the detailed CPAN module installation guide.