@@ -129,13 +129,14 @@ default.
129129
130130=head2 man_url_prefix
131131
132- In turning C<< L<crontab(5)> >> into http://whatever/man/1/crontab, what
133- to put before the "1/crontab". The default value is
134- "http ://man.he.net /man".
132+ In turning C<< L<crontab(5)> >> into http://whatever/man/1/crontab.1 , what
133+ to put before the "1/crontab.1 ". The default value is
134+ "https ://man7.org/linux/man-pages /man".
135135
136136=head2 man_url_postfix
137137
138- What to put after "1/crontab" in the URL. This option is not set by default.
138+ What to put after "1/crontab.1" in the URL.
139+ This option is set to ".html" by default.
139140
140141=head2 title_prefix, title_postfix
141142
@@ -276,7 +277,8 @@ sub new {
276277 my $new = $self -> SUPER::new(@_ );
277278 $new -> {' output_fh' } ||= *STDOUT {IO };
278279 $new -> perldoc_url_prefix(' https://metacpan.org/pod/' );
279- $new -> man_url_prefix(' http://man.he.net/man' );
280+ $new -> man_url_prefix(' https://man7.org/linux/man-pages/man' );
281+ $new -> man_url_postfix(' .html' );
280282 $new -> html_charset(' ISO-8859-1' );
281283 $new -> nix_X_codes(1);
282284 $new -> {' scratch' } = ' ' ;
@@ -774,25 +776,25 @@ sub resolve_pod_page_link {
774776Resolves a man page link target and numeric section to a URL. The resulting
775777link will be returned for the above examples as:
776778
777- http ://man.he.net/ man5/crontab
778- http ://man.he.net/ man1/crontab
779+ https ://man7.org/linux/man-pages/ man5/crontab.5.html
780+ https ://man7.org/linux/man-pages/ man1/crontab.1.html
779781
780782Note that the first argument is required. The section number will be parsed
781783from it, and if it's missing will default to 1. The second argument is
782- currently ignored, as L<man.he.net|http://man.he.net> does not currently
783- include linkable IDs or anchor names in its pages. Subclass to link to a
784- different man page HTTP server.
784+ currently ignored. Subclass to link to a different man page HTTP server.
785785
786786=cut
787787
788788sub resolve_man_page_link {
789789 my ($self , $to , $section ) = @_ ;
790790 return undef unless defined $to ;
791+
791792 my ($page , $part ) = $to =~ / ^([^(]+)(?:[(](\d +)[)])?$ / ;
792793 return undef unless $page ;
794+
793795 return ($self -> man_url_prefix || ' ' )
794796 . ($part || 1) . " /" . $self -> encode_entities($page )
795- . ($self -> man_url_postfix || ' ' );
797+ . " . " . ( $part || 1) . ($self -> man_url_postfix || ' ' );
796798
797799}
798800
@@ -905,11 +907,6 @@ This program is distributed in the hope that it will be useful, but
905907without any warranty; without even the implied warranty of
906908merchantability or fitness for a particular purpose.
907909
908- =head1 ACKNOWLEDGEMENTS
909-
910- Thanks to L<Hurricane Electric|http://he.net/> for permission to use its
911- L<Linux man pages online|http://man.he.net/> site for man page links.
912-
913910=head1 AUTHOR
914911
915912Pod::Simple::XHTML was created by Allison Randal <[email protected] >.
0 commit comments