DrHyde / perl-modules-Number-Phone

Number::Phone and friends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number::Phone::UK fails on read-only filesystems

sdt opened this issue · comments

We try to run most of our docker containers in read-only mode these days. Trying to validate a UK number we ran into this:

$ perl -MNumber::Phone -e 'Number::Phone->new("+44 1632 960991")'

DBM::Deep: Cannot sysopen file '/usr/local/lib/perl5/site_perl/5.32.1/auto/share/dist/Number-Phone/Number-Phone-UK-Data.db': Read-only file system

It seems DBM::Deep->new($filename) opens the file in rw mode, but it will also accept a read-only filehandle.

We're using --without_uk as a workaround.

Ooh, that's an interesting edge-case. And should be easy to fix too.

Fixed in c7d2bee, please test! This will be in the next quarterly release.

I can confirm that fix works for me. Thank you - very much appreciated!

Thank you for helping me iterate asymptotically towards software perfection :-)

Released