File tree 1 file changed +9
-12
lines changed
1 file changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,8 @@ sub process_file
51
51
$file =~ m / -(\d +)\. / ;
52
52
my $major_version = $1 ;
53
53
54
- open (my $fh , ' <' , $file ) || die " could not open file %s : $! \n " , $file ;
55
- open (my $tfh , ' >' , $tmpfile ) || die " could not open file %s : $! \n " ,
56
- $tmpfile ;
54
+ open (my $fh , ' <' , $file ) || die " could not open file $file : $! \n " ;
55
+ open (my $tfh , ' >' , $tmpfile ) || die " could not open file $tmpfile : $! \n " ;
57
56
58
57
while (<$fh >)
59
58
{
@@ -64,9 +63,9 @@ sub process_file
64
63
# skip over commit links because we will add them below
65
64
next
66
65
if (!$in_comment &&
67
- m { ^\s *<ulink url="&commit_baseurl;[\d a-f ]+">§</ulink>\s *$} );
66
+ m { ^\s *<ulink url="&commit_baseurl;[[:xdigit:] ]+">§</ulink>\s *$} );
68
67
69
- if ($in_comment && m /\[ ([\d a-f ]+)\] / )
68
+ if ($in_comment && m /\[ ([[:xdigit:] ]+)\] / )
70
69
{
71
70
my $hash = $1 ;
72
71
@@ -88,23 +87,21 @@ sub process_file
88
87
{
89
88
for my $hash (@hashes )
90
89
{
91
- print ({$tfh }
92
- " $prev_leading_space <ulink url=\" &commit_baseurl;$hash \" >§</ulink>\n "
93
- );
90
+ print $tfh
91
+ " $prev_leading_space <ulink url=\" &commit_baseurl;$hash \" >§</ulink>\n " ;
94
92
}
95
93
@hashes = ();
96
94
}
97
95
else
98
96
{
99
- printf (
100
- " hashes found but no matching text found for placement on line %s \n " ,
101
- $lineno );
97
+ print
98
+ " hashes found but no matching text found for placement on line $lineno \n " ;
102
99
exit (1);
103
100
}
104
101
}
105
102
}
106
103
107
- print ({ $tfh } $_ ) ;
104
+ print $tfh $_ ;
108
105
109
106
$prev_line_ended_with_paren = m /\)\s *$ / ;
110
107
You can’t perform that action at this time.
0 commit comments