On Fri, 19 Aug 2011, Kris Jurka wrote:
> For me this fails with:
>
> Bareword "Tie::File" not allowed while "strict subs" in use at
> /home/jurka/pg/server/postgresql/src/tools/copyright.pl line 28.
>
This fixes things for me. The copyright matching wasn't working for me
either without escaping the parentheses.
Kris Jurka
diff --git a/src/tools/copyright.pl b/src/tools/copyright.pl
index 96b1f22..9531430 100644
--- a/src/tools/copyright.pl
+++ b/src/tools/copyright.pl
@@ -10,10 +10,11 @@
use strict;
use warnings;
+use Tie::File;
use File::Find;
my $pgdg = 'PostgreSQL Global Development Group';
-my $cc = 'Copyright (c) ';
+my $cc = 'Copyright \(c\) ';
# year-1900 is what localtime(time) puts in element 5
my $year = 1900 + ${[localtime(time)]}[5];
@@ -25,7 +26,7 @@ sub wanted {
return unless -f $File::Find::name;
my @lines;
- tie @lines, Tie::File, $File::Find::name;
+ tie @lines, 'Tie::File', $File::Find::name;
foreach my $line (@lines) {
# We only care about lines with a copyright notice.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers