DrHyde / perl-modules-Number-Phone

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

Split Number::Phone::UK into separate distribution #95

Closed domm closed 3 years ago

domm commented 5 years ago

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.

DrHyde commented 5 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.

DrHyde commented 3 years ago

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:

DrHyde commented 3 years ago

Merged, and will be in the next release.

DrHyde commented 1 year ago

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.