DrHyde / perl-modules-Number-Phone

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

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

Closed sdt closed 2 years ago

sdt commented 2 years ago

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.

DrHyde commented 2 years ago

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

DrHyde commented 2 years ago

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

sdt commented 2 years ago

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

DrHyde commented 2 years ago

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

DrHyde commented 2 years ago

Released