Subject: | "Used only once" warning under perl 5.10 |
Heya,
The upcoming release of perl 5.10 is a little pickier about "so-and-so
used only once" warnings. Looking for the Lexicon in Locale::Maketext,
for instance, triggers such. A simple patch is attached.
- Alex
Subject: | locale-maketext-only-once.patch |
diff -ru Locale-Maketext-1.11_01/lib/Locale/Maketext.pm Locale-Maketext-1.11_01-modified/lib/Locale/Maketext.pm
--- Locale-Maketext-1.11_01/lib/Locale/Maketext.pm 2007-05-08 00:35:58.000000000 -0400
+++ Locale-Maketext-1.11_01-modified/lib/Locale/Maketext.pm 2007-11-16 12:39:32.000000000 -0500
@@ -425,6 +425,7 @@
sub _lex_refs { # report the lexicon references for this handle's class
# returns an arrayREF!
no strict 'refs';
+ no warnings 'once';
my $class = ref($_[0]) || $_[0];
print "Lex refs lookup on $class\n" if DEBUG > 1;
return $isa_scan{$class} if exists $isa_scan{$class}; # memoization!