DrHyde / perl-modules-Number-Phone

Number::Phone and friends
24 stars 31 forks source link

Can't use undefined value as a HASH reference #64

Closed KES777 closed 6 years ago

KES777 commented 7 years ago
$x= Number::Phone->new( '+380619265745' )
Number::Phone::StubCountry::UA=HASH(0x20d0b50)

$x->areaname
ERROR: Can't use an undefined value as a HASH reference at local/lib/perl5/Number/Phone/StubCountry.pm line 55, <STDIN> line 21.
dracos commented 6 years ago

A data update or similar appears to have fixed this particular number:

perl -e'use Number::Phone; $x= Number::Phone->new( "+380619265745" ); print $x->areaname;'
Zaporizhzhia

But the general issue remains (e.g. for Australian number). I've made a PR at #82

KES777 commented 6 years ago

A data update or similar

What should I update to fix that? Thank you

dracos commented 6 years ago

I don't know, I don't know what version you have installed or how you installed it. I recommend that you install the latest version however you installed the version you are using, or ask whoever installed it for you.

DrHyde commented 6 years ago

Thanks, I've merged @dracos's PR. This fix will be in the next release to hit the CPAN. When that is released I will notify the mailing list. If you're not on the mailing list please join, it's very low traffic. You can join here: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/number-phone