We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentda64fb9 commit272c289Copy full SHA for 272c289
src/tools/copyright.pl
@@ -22,12 +22,14 @@
22
find({wanted=> \&wanted,no_chdir=> 1},'.');
23
24
subwanted {
25
-returnunless-f$File::Find::name;
+my$filename =$File::Find::name;
26
27
-my@lines;
28
-tie@lines, Tie::File,$File::Find::name;
+# only regular files
+returnif !-f$filename;
29
30
-foreachmy$line (@lines) {
+open(my$FILE,'<',$filename)ordie"Cannot open$filename";
31
+
32
+foreachmy$line (<$FILE>) {
33
# We only care about lines with a copyright notice.
34
nextunless$line =~m/$cc.*$pgdg/;
35
# We stop when we've done one substitution. This is both for
@@ -37,7 +39,7 @@ sub wanted {
37
39
lastif$line =~s/($cc\d{4})(, $pgdg)/$1-$year$2/;
38
40
lastif$line =~s/($cc\d{4})-\d{4}(, $pgdg)/$1-$year$2/;
41
}
-untie@lines;
42
+close($FILE)ordie"Cannot close$filename";
43
44
45
print"Manually update doc/src/sgml/legal.sgml and src/interfaces/libpq/libpq.rc.in too\n";