[Dub-pm] Phone numbers

Dermot McNally dermot at directski.com
Tue Oct 19 08:36:32 CDT 2004


David Cantrell wrote:

 > I'm putting together a big patch to bring Number::Phone::Country up to
 > date.  It takes a phone number in "international" format (ie, with
 > country code) and tells you what country it is in.

What the other folks said about 048, stands, but there's a snag trying 
to incorporate enough clevers to handle this into 
Number::Phone::Country. The lookup expects the number you provide to be 
in full international format. Arguably, the number +353-48-12345678 is 
only a pseudo-international number, as I'm not sure if you can dial it 
from anywhere outside ROI.

What are you planning? To have numbers of that format as well as the 
+44-28-12345678 equivalent map to a mock-ISO code for NI?

FWIW, a while ago I went looking for some modules that would help me 
process phone numbers and help me to decompose them into their 
constituent country, area and base number. (Which is hard without 
country-specific logic to tell you how to infer the area code). I ended 
up growing my own for the most part. My work in progress also has - 
unlike Number::Phone::Country - the concept of where-in-the-world you 
are running it from, which was designed to allow you to render numbers 
in your own country according to local convention. Oh, it supports 
pretty-printing with support for national norms.

However, I ended up pulling some nasty stunts in the country-specific 
classes in ways that are not very scalable. It might benefit from a 
fresh set of eyes, so I'll see if I can pull it together if anybody is 
interested. It's a POD-free zone, but not hard to see what's going on.

Dermot

-- 
------------------------------------------------------------------------
Dermot McNally, Chief Technical Officer, Directski.com
dermot at directski.com     http://www.directski.com - ski for less


More information about the Dublin-pm mailing list