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::Phone object ⭐

...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. 😭

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