From cc1af7b2d4911404b201984753ed18370ecef8a1 Mon Sep 17 00:00:00 2001 From: Dan Book Date: Wed, 9 Apr 2025 21:50:06 -0400 Subject: [PATCH] Don't try to link to INSTALL which is not linkable documentation Also remove the code in autodoc.pl which attempts to create these links. --- Porting/todo.pod | 2 +- README.bs2000 | 2 +- autodoc.pl | 25 ++++++++++++------------- pod/perl5122delta.pod | 2 +- pod/perlrun.pod | 2 +- pod/perlunicode.pod | 2 +- pod/perlvar.pod | 2 +- 7 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Porting/todo.pod b/Porting/todo.pod index 8c8ed3301bd2..d7a25e6e1a85 100644 --- a/Porting/todo.pod +++ b/Porting/todo.pod @@ -288,7 +288,7 @@ to do this manually are roughly =item * do a normal C, but include Devel::Cover as a module to install -(see L for how to do this) +(see F for how to do this) =item * diff --git a/README.bs2000 b/README.bs2000 index 2ea0d1234206..f5ea31f531ab 100644 --- a/README.bs2000 +++ b/README.bs2000 @@ -219,7 +219,7 @@ Thomas Dorner =head1 SEE ALSO -L, L. +F, L. =head2 Mailing list diff --git a/autodoc.pl b/autodoc.pl index 77cfe22a780b..3540893211eb 100644 --- a/autodoc.pl +++ b/autodoc.pl @@ -1224,21 +1224,24 @@ sub parse_config_h { | sh | SH | exe ) \b !xx; my $path_name_qr = qr! (?: / \w+ )+ !x; - for my $re ($file_name_qr, $path_name_qr) { - s! (*nlb:[ < \w / ]) ( $re ) !<$1>!gxx; - } + my $file_or_path_name_qr = qr! + $file_name_qr + | + $path_name_qr + | + INSTALL \b + !x; + s! (*nlb:[ < \w / ]) ( $file_or_path_name_qr ) !<$1>!gxx; # Enclose <... file/path names with F<...> (but no double # angle brackets) - for my $re ($file_name_qr, $path_name_qr) { - s! < ( $re ) > !F<$1>!gxx; - } + s! < ( $file_or_path_name_qr ) > !F<$1>!gxx; # Explain metaconfig units s/ ( \w+ \. U \b ) /$1 (part of metaconfig)/gx; # Convert "See foo" to "See C>" if foo is described in - # this file. Also create a link to the known file INSTALL. + # this file. # And, to be more general, handle "See also foo and bar", and # "See also foo, bar, and baz" while (m/ \b [Ss]ee \s+ @@ -1249,10 +1252,7 @@ sub parse_config_h { push @links, $2 if defined $2; push @links, $3 if defined $3; foreach my $link (@links) { - if ($link eq 'INSTALL') { - s/ \b INSTALL \b /C>/xg; - } - elsif (grep { $link =~ / \b $_ \b /x } keys %configs) { + if (grep { $link =~ / \b $_ \b /x } keys %configs) { s| \b $link \b |C>|xg; $configs{$link}{linked} = 1; $configs{$name}{linked} = 1; @@ -1261,7 +1261,6 @@ sub parse_config_h { } # Enclose what we think are symbols with C<...>. - no warnings 'experimental::vlb'; s/ (*nlb:<) ( # Any word followed immediately with parens or @@ -1269,7 +1268,7 @@ sub parse_config_h { \b \w+ (?: \( [^)]* \) # parameter list | \[ [^]]* \] # or array reference ) - | (*plb: ^ | \s ) -D \w+ # Also -Dsymbols. + | (*nlb: \S ) -D \w+ # Also -Dsymbols. | \b (?: struct | union ) \s \w+ # Words that contain underscores (which are diff --git a/pod/perl5122delta.pod b/pod/perl5122delta.pod index 1b3651ffbd67..cad2a4e5acfa 100644 --- a/pod/perl5122delta.pod +++ b/pod/perl5122delta.pod @@ -122,7 +122,7 @@ role in the exception mechanism. =item * -Perl's L file has been clarified to explicitly state that Perl +Perl's F file has been clarified to explicitly state that Perl requires a C89 compliant ANSI C Compiler. =item * diff --git a/pod/perlrun.pod b/pod/perlrun.pod index e880d70d99c3..92d3c8ecdb43 100644 --- a/pod/perlrun.pod +++ b/pod/perlrun.pod @@ -444,7 +444,7 @@ B<-D14> is equivalent to B<-Dtls>): All these flags require B<-DDEBUGGING> when you compile the Perl executable (but see C<:opd> in L or L which may change this). -See the L file in the Perl source distribution +See the F file in the Perl source distribution for how to do this. If you're just trying to get a print out of each line of Perl code diff --git a/pod/perlunicode.pod b/pod/perlunicode.pod index 1ca05b841a42..fb935760a219 100644 --- a/pod/perlunicode.pod +++ b/pod/perlunicode.pod @@ -2086,7 +2086,7 @@ Download the files in the desired version of Unicode from the Unicode web site L). These should replace the existing files in F in the Perl source tree. Follow the instructions in F in that directory to change some of their names, and then build -perl (see L). +perl (see F). =head2 Porting code from perl-5.6.X diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 559ca8ebe3e7..29f8d7fc4a03 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -594,7 +594,7 @@ Then $^M = 'a' x (1 << 16); would allocate a 64K buffer for use in an emergency. See the -L file in the Perl distribution for information on how to +F file in the Perl distribution for information on how to add custom C compilation flags when compiling perl. To discourage casual use of this advanced feature, there is no L long name for this variable.