Michael G Schwern <[EMAIL PROTECTED]> writes:

> The MacPerl POD viewer, Shuck, has this neat little feature which lets
> you view the code with the POD.  (I'll see if I can make a screenshot).
> So if you write the POD like this:

>     =item B<some_func>

>         my $bar = some_func($foo);

>     Does something with $foo and sends back $bar.

>     =cut

>     sub some_func {
>         ...
>     }

> You actually see the formatted docs right above the code.  Very nice for
> explaining code or printing.  Better than having to read raw POD anyway.

> I've always been bummed that perldoc couldn't do this.  So I patched
> pod2text to do it (patch below).  It's pretty straight forward.  If I
> understood nroff I could do it to pod2man and perldoc, too.

I've applied this patch with some modifications to the current version of
Pod::Text, elevating --code to an option to the module.  Pod::Text just
prints out the code without highlighting, and Pod::Text::Color,
Pod::Text::Overstrike, and Pod::Text::Termcap all do something vaguely
appropriate.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>

Reply via email to