| [reply] [d/l] [select] |
[cpan://pod term], [metacpan://pod term] pod term, pod term -> Pod::Perldoc::ToTerm - render Pod with terminal escapes ... alt, indent, loose, quotes, sentence, width
So there you go, you have a start :) SMOP-it extension for code paragraphs (verbatim) with Text::VimColor and you're done
You could also hack PPI::HTML to ansi up the text with Term::ANSIColor::Markup
proof of concept should take all of 5 minutes ;P | [reply] [d/l] |
If you could only use X :-) .... Tk::Pod or Gtk2::Ex::PodViewer
| [reply] |
> Is it possible?
Yes! But I haven't seen it implemented yet.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
update
Actually I'm not sure if there are native pagers which support coloring (like with Term::ANSIColor ), but you asked about terminals.
Otherwise see How (Not) To Ask A Question.
| [reply] |
And the concept is proven
All thats left to do, is settle on a name (maybe call it perldocolor), maybe package it up as a module or a exe, improve color mapping naturally (allow for background and foreground... just finish it up, fill in the blanks, provide for stylesheet-alike specification, default stylesheets , work out the quirks with colorize)...
You're welcome
| [reply] [d/l] |
Too lazy for a proof of concept, but FWIW...
... I'd rather use perldoc -ohtml in combination with perltidy -html for the parts within <pre> tags and w3m or lynx as a "pager".
NB: Not every intended block in POD is necessarily Perl code, so some "looks like Perl" heuristic might be useful.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
| [reply] [d/l] [select] |
| [reply] [d/l] |
Yes it is possible now. Using bash:
export PERLDOC="-M Pod::Text::Color"
or
export PERLDOC="-M Pod::Text::Color::Delight"
and now "perldoc" colorizes. Whichever module you use must be installed with, e.g. cpanm
| [reply] [d/l] [select] |