More Number::Phone

drhyde on 2004-10-21T10:19:04

Fly free, version 1.3!

Defined two new methods after discussions with Dermot McNally:

  • areaname() - returns the name of an area code, so for a +44 20 number it'll tell you London.
  • translates_to() - allows you to figure out how different bits of number-space can map onto each other. Dermot will probably use it for +353 48 numbers which map directly onto +44 28.


And T.J.Mather's module Number::Phone::Country is now maintained by me, and included in the Number::Phone distribution. I've tidied it up a bit and fixed some of its data (added some countries to the NANP, added craziness to do with Northern Ireland and Gibraltar, split +7 into Kazakhstan and Russia) but it still needs a little more work. I intend to use it when I write Number::Phone::NANP, but for now it's not really got much to do with the rest of the distribution.


fossilized knowledge

jmm on 2004-10-21T14:01:45

I know the acronym NANP from learning it 30 years ago when it meant "North America Numbering Plan". Obviously it has been extended to take over the world but kept the same name. Has the acronym been forward engineered to have different base words?

Re:fossilized knowledge

barbie on 2004-10-21T14:35:33

Perhaps its ... However, I think North America Numbering Plan is probably more accurate in this case :)

Re:fossilized knowledge

jmm on 2004-10-21T15:25:59

Yes, but +44 ### being recognized as London seems to extend the definition of "North America" in a significant way. I wondered if they had renamed the scheme to New Authoritative Numbering Plan or some such, to include the rest of the world while keeping the same acronym. (From the web page you mention, it looks like the original name is still in use, for the original North America plus a bit purpose; so now I wonder if the use of NANP in the original posting is even correct.)

Re:fossilized knowledge

jmm on 2004-10-21T15:28:43

Oops - I just went back and looked at the original entry more carefully and NANP was not being used for the entire scheme, just for one of the possible sub-schemes.

Sorry. Please move along, there is nothing to see here, this is not the idiot you are looking for.