Number...tional(3pm)
β¨ NAME β¨
okay so bestie, meet Number::Phone::Formatter::National π β she's the formatter that gives you a phone number in its national format. That's it, that's the whole job, and she does it flawlessly. Periodt.
πΈ DESCRIPTION πΈ
It's a formatter β¨. What does it do? It outputs the number in its national format. Simple, iconic, no notes. π
π METHOD π
format
Not me having literally one method β yes, this is the only one, and honestly? She doesn't need more. π
It takes two things:
- an E.123 international format string π¦
- a
Number::Phoneobject β
...and it hands you back the nationally-formatted number. Like, slay.
+1 212 334 0611 -> 212-334-0611
π«Ά heads up bestie: this uses data derived from libphonenumber, and if your object isn't derived from that, it will first create a temporary object. That may involve a small unexpected performance hit β so like, unexpected, not a vibe you planned for. Just so you know. π
π AUTHOR, COPYRIGHT and LICENCE π
Copyright 2018 Matthew Somerville <matthew-github@dracos.co.uk> π
This software is free-as-in-speech software, and may be used, distributed, and modified under the terms of either the GNU General Public Licence version 2 or the Artistic Licence. It's up to you which one you use π. The full text of the licences can be found in the files GPL2.txt and ARTISTIC.txt, respectively. No cap, go read them, they're right there. πβ¨
π that's the whole page, my love β this beauty ships as part of perl v5.40.1, dated 2026-06-11, and it lives its life as a section 3pm manual page. Ate. π π
π¦ 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