Number...e::Lib(3pm)
πΈ NAME πΈ
Number::Phone::Lib β bestie, this is how you instantiate Number::Phone::* objects straight from libphonenumber. That's the whole vibe. π
β¨ SYNOPSIS β¨
use Number::Phone::Lib;
$daves_phone = Number::Phone::Lib->new('+442087712924');
$daves_other_phone = Number::Phone::Lib->new('+44 7979 866 975');
# alternatively Number::Phone::Lib->new('+44', '7979 866 975');
# or Number::Phone::Lib->new('UK', '07979 866 975');
if ( $daves_phone->is_mobile() ) {
send_rude_SMS();
}
π DESCRIPTION π
Okay so here's the tea, bestie: this subclass of Number::Phone gets used exactly the same way as the normal Number::Phone β the way you call it doesn't change, no cap. The one thing that does change is that it exclusively uses classes generated from Google's libphonenumber project (https://code.google.com/p/libphonenumber/). π
Now, lowkey important: libphonenumber doesn't have enough data to support all the features of Number::Phone. It's giving limited, but iconic. So why would you ever reach for its data and nothing else? A few reasons, fr fr:
- Compatibility with libphonenumber's Java, C++, and JavaScript implementations. π€
- Performance. UK Number parsing and validation by Number::Phone::UK, in particular, has a substantial overhead thanks to its embedded database. If all you need is simple validation and/or formatting, all that overhead is just unnecessary. Periodt. π
That said β and bestie, I need you to hear this β the core Number::Phone UK module is far more comprehensive. Like, not even close. So if you need the full suite, that's your girl. π
π METHODS π
There is one method. Just one. A constructor. She's simple, she's iconic, she's all you get. π
new
Call this in exactly the same way as you would call Number::Phone->new(). Same energy, same argument shape, no surprises.
The only difference? You get stubs back instead of "full-fat" objects β even if full-fat classes are available. Like, she'll tease you with the possibility and then hand you the cute minimal version. π
π¦ LICENCE π¦
You may use, modify and distribute this software under the same terms as perl itself. Go off. β¨
π AUTHORS π
- David Cantrell
<david@cantrell.org.uk> - David E. Wheeler
<david@justatheory.com>
Copyright 2026. π
okay that's the whole page bestie, you ate it up β this was perl v5.40.1 content from 2026-06-11, Number...e::Lib(3pm), mwah π
π¦ where this page comes from
- ubuntu stonking: libnumber-phone-perl 4.0011-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms