@@ -1224,21 +1224,24 @@ sub parse_config_h {
12241224 | sh | SH | exe ) \b
12251225 ! xx ;
12261226 my $path_name_qr = qr ! (?: / \w + )+ ! x ;
1227- for my $re ($file_name_qr , $path_name_qr ) {
1228- s ! (*nlb:[ < \w / ]) ( $re ) ! <$1 >! gxx ;
1229- }
1227+ my $file_or_path_name_qr = qr !
1228+ $file_name_qr
1229+ |
1230+ $path_name_qr
1231+ |
1232+ INSTALL \b
1233+ ! x ;
1234+ s ! (*nlb:[ < \w / ]) ( $file_or_path_name_qr ) ! <$1 >! gxx ;
12301235
12311236 # Enclose <... file/path names with F<...> (but no double
12321237 # angle brackets)
1233- for my $re ($file_name_qr , $path_name_qr ) {
1234- s ! < ( $re ) > ! F<$1 >! gxx ;
1235- }
1238+ s ! < ( $file_or_path_name_qr ) > ! F<$1 >! gxx ;
12361239
12371240 # Explain metaconfig units
12381241 s / ( \w + \. U \b ) / $1 (part of metaconfig)/ gx ;
12391242
12401243 # Convert "See foo" to "See C<L</foo>>" if foo is described in
1241- # this file. Also create a link to the known file INSTALL.
1244+ # this file.
12421245 # And, to be more general, handle "See also foo and bar", and
12431246 # "See also foo, bar, and baz"
12441247 while (m / \b [Ss] ee \s +
@@ -1249,10 +1252,7 @@ sub parse_config_h {
12491252 push @links , $2 if defined $2 ;
12501253 push @links , $3 if defined $3 ;
12511254 foreach my $link (@links ) {
1252- if ($link eq ' INSTALL' ) {
1253- s / \b INSTALL \b / C<L<INSTALL>>/ xg ;
1254- }
1255- elsif (grep { $link =~ / \b $_ \b /x } keys %configs ) {
1255+ if (grep { $link =~ / \b $_ \b /x } keys %configs ) {
12561256 s | \b $link \b | C<L</$link >>| xg ;
12571257 $configs {$link }{linked } = 1;
12581258 $configs {$name }{linked } = 1;
@@ -1261,15 +1261,14 @@ sub parse_config_h {
12611261 }
12621262
12631263 # Enclose what we think are symbols with C<...>.
1264- no warnings ' experimental::vlb' ;
12651264 s / (*nlb:<)
12661265 (
12671266 # Any word followed immediately with parens or
12681267 # brackets
12691268 \b \w + (?: \( [^)]* \) # parameter list
12701269 | \[ [^]]* \] # or array reference
12711270 )
1272- | (*plb: ^ | \s ) -D \w + # Also -Dsymbols.
1271+ | (*nlb: \S ) -D \w + # Also -Dsymbols.
12731272 | \b (?: struct | union ) \s \w +
12741273
12751274 # Words that contain underscores (which are
0 commit comments