diff options
author | Barrie Slaymaker <barries@slaysys.com> | 1999-02-11 11:29:24 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-15 04:23:29 +0000 |
commit | 29f227c9ad9c7325fbd0ac33567c35e06a70acb5 (patch) | |
tree | 7926613b9917c9f8fe242e4e17af0b40272ec0e2 /installhtml | |
parent | c27914c9eca8e82f17c1981f2a8473db3b90ad36 (diff) | |
download | perl-29f227c9ad9c7325fbd0ac33567c35e06a70acb5.tar.gz |
backout change#2811 and add newer version based on File::Spec
Message-ID: <36C34BB4.A62090E0@telerama.com>
Subject: [PATCH]5.005_54 (pod2html) Relative URLs using new File::Spec
p4raw-link: @2811 on //depot/cfgperl: 5a039dd3f529422cb070070772502cedaf09ae20
p4raw-id: //depot/perl@2931
Diffstat (limited to 'installhtml')
-rwxr-xr-x | installhtml | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/installhtml b/installhtml index ad7e66e70a..db1e612865 100755 --- a/installhtml +++ b/installhtml @@ -236,7 +236,12 @@ foreach $dir (@splithead) { @data = (); while (<H>) { last if /NAME=/; - s,HREF="#(.*)">,HREF="$file/$1.html">,g; + $_ =~ s{HREF="#(.*)">}{ + my $url = "$file/$1.html" ; + $url = Pod::Html::relativize_url( $url, "$file.html" ) + if ( ! defined $opt_htmlroot || $opt_htmlroot eq '' ) ; + "HREF=\"$url\">" ; + }eg; push @data, $_; } close(H); @@ -320,9 +325,14 @@ sub create_index { if (defined $lcp1 and $lcp1 eq '<P>') { # Uninteresting. Try again. ($lcp1,$lcp2) = ($name =~ m,/H1>\s<P>\s(\S+)\s[\s-]*(.*?)\s*$,sm); } - print HTML qq(<A HREF="$dir/$file">); + my $url= "$dir/$file" ; + if ( ! defined $opt_htmlroot || $opt_htmlroot eq '' ) { + $url = Pod::Html::relativize_url( "$dir/$file", $html ) ; + } + + print HTML qq(<A HREF="$url">); print HTML "<DT>$lcp1</A><DD>$lcp2\n" if defined $lcp1; -# print HTML qq(<A HREF="$dir/$file">$lcp1</A><BR>\n") if defined $lcp1; +# print HTML qq(<A HREF="$url">$lcp1</A><BR>\n") if defined $lcp1; next; |