Closed domm closed 3 years ago
Provided that you also delete lib/Number/Phone/UK.pm then you can delete that file. Number::Phone will fall back to using the slightly less capable Number::Phone::StubCountry::GB. If you don't need the extra functionality - mostly data on which operator numbers are assigned to - then you'll get roughly the same results, and get them faster too.
Splitting it out would involve quite a long deprecation cycle, but it's something I'll consider.
Does this help? https://github.com/DrHyde/perl-modules-Number-Phone/tree/build-without-uk
$ perl Makefile.PL --without_uk
$ make
$ ...
not thoroughly tested (indeed, hardly tested at all, which is why there's no documentation, I don't want users finding it yet and the details might change) and you will almost certainly get test failures in make test
.
TODO before this can be merged:
make test
fails doesn't currently get as far as checking the installMerged, and will be in the next release.
FYI the next release uses a different file format for the UK database. The file will be about 6% of the size of the previous format.
I have an app running in a docker container where I use Number::Phone to validate phone numbers. The file
Number-Phone-UK-Data.db
takes up 1/3 of the total size of the container.If you would split Number::Phone::UK into a separate distribution, I could have even smaller (faster to deploy, cheaper to run) containers.