Attached patch. By default in 0.10, L<> goes to search.cpan.org. With
this patch and another PerlSetVar, the links come back to the
originating server.
--- /usr/local/lib/perl5/site_perl/5.8.2/Apache/Pod/HTML.pm 2004-05-24 16:17:00.000000000 -0500
+++ HTML.pm 2005-07-12 10:17:09.000000000 -0500
@@ -46,6 +46,7 @@
SetHandler perl-script
PerlHandler Apache::Pod::HTML
PerlSetVar STYLESHEET auto
+ PerlSetVar MODULELINK LOCAL
</Location>
You can then get documentation for a module C<Foo::Bar> at the URL
@@ -63,6 +64,11 @@
to be used. If you prefer, you can replace the word 'auto' with the URL of
your own custom stylesheet file.
+Specifying an optional C<MODULELINK> variable changes the external
+HTTP links to use a URL prefix of your specification instead of using
+L<Pod::Simple::HTML>'s default. Using the magic word C<LOCAL> will make
+links local instead of external.
+
=cut
sub handler {
@@ -84,6 +90,11 @@
$parser->complain_stderr(1);
$parser->output_string( \$body );
$parser->index( 1 );
+ if (my $prefix = $r->dir_config('MODULELINK')) {
+ $prefix eq 'LOCAL' ?
+ $parser->perldoc_url_prefix($r->location . '/') :
+ $parser->perldoc_url_prefix($prefix);
+ }
$parser->parse_file( $file );
# TODO: Send the timestamp of the file in the header