Subject: | Lingua::EN::Numbers::Easy doesn't work with Lingua::EN::Numbers >= 2.00 |
Lingua::EN::Numbers 2.00 drops the long deprecated object-oriented interface this module uses.
The following patch fixes the issue by switching to the procedural interface:
--- a/lib/Lingua/EN/Numbers/Easy.pm
+++ b/lib/Lingua/EN/Numbers/Easy.pm
@@ -7,7 +7,7 @@ no warnings 'syntax';
our $VERSION = '2009110701';
our %N;
-use Lingua::EN::Numbers 1.01;
+use Lingua::EN::Numbers 1.01 qw(num2en);
sub import {
my ($pkg, $hash) = grep {$_ ne 'American' and
@@ -27,8 +27,8 @@ sub FETCH {
my $self = shift;
my $value = shift;
return $self -> {$value} if exists $self -> {$value};
- (my $n = Lingua::EN::Numbers -> new) -> parse ($value) or return;
- $self -> {$value} = lc $n -> get_string;
+ my $n = num2en($value) or return;
+ $self -> {$value} = lc $n;
}
sub STORE {die}