Subject: | Locale::US fails after second call to new |
If you do the following:
use Locale::US;
my $u = Locale::US->new(); # ok
my $u2 = Locale::US->new(); # fails
Patch file, adds:
my $start_pos = tell( DATA );
prior to reading, and:
seek( DATA, $start_pos, 0 );
to after reading.
Subject: | locale_us.patch |
--- US.pm 2010/04/27 20:42:06 1.1
+++ US.pm 2010/04/27 16:42:44
@@ -36,6 +36,7 @@
my $class = shift;
my $self = {} ;
+ my $start_pos = tell( DATA );
while ( <DATA>) {
chomp;
@@ -45,6 +46,8 @@
$self->{code2state}{$code} = $state;
$self->{state2code}{$state} = $code;
}
+
+ seek( DATA, $start_pos, 0 );
# warn Dumper $self;
bless $self, $class;