in reply to POD L<> and relative links?
Write your own Pod translator.
No, seriously, it's really easy. I talk about it in a chapter for or two for Mastering Perl, but mostly "Working with Pod". Although I use Pod::PseudoPod::HTML because O'Reilly has some extra Pod features, it's the same idea. You can even grab my own pod2html from the Mastering Perl repository. All of the HTML for the chapter pages comes out of my own pod2html.
Instead of using pod2html (the one that uses Pod::Html from Tom C.), create your own pod2html. It's not that hard considering that the entire script is:
use Pod::Html; pod2html @ARGV;
The Pod::Simple equivalent is:
use Pod::Simple::HTML; Pod::Simple::HTML->parse_from_file( @ARGV );
That's just the stock, off-the-shelf behavior though. If you want to change what happens when it parses the L<> stuff, you only have to override the parts that handle that part.
package My::Pod::HTML::Simple; use base qw( Pod::HTML::Simple ); sub do_link { ... whatever you want ... } 1;
Now your pod2html becomes:
use My::Pod::Simple::HTML; My::Pod::Simple::HTML->parse_from_file( @ARGV );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: POD L<> and relative links?
by skazat (Chaplain) on Oct 20, 2006 at 00:03 UTC | |
|
Re^2: POD L<> and relative links?
by halley (Prior) on Oct 20, 2006 at 14:16 UTC | |
by skazat (Chaplain) on Oct 23, 2006 at 21:44 UTC |