Many months ago, I muttered at some of the many people who maintain modules in the CPAN which deal with phone numbers. They're all good modules, but have no common interface. Which sucks. If I'm dealing with phone numbers, I want to have the same interface to those numbers, where possible, regardless of whether I'm looking at a Japanese number or a German number. So I proposed a common interface, based on the sort of functionality I wanted when I was working for a telco and doing calculations based on phone numbers for a living. The feedback was pretty positive.
Fast forward to a month ago, and I had finally finished Number::Phone version 1.0, a generic superclass. On top of that, I implemented Number::Phone::UK which tells you whether a given UK number is a land line, a mobile, which telco terminates it, and so on. Since then I've released two updates, which are largely to do with updates in the UK numbering plan, such as new number ranges being allocated.
I'd really like some feedback on the API from other people.
regulator
because you're mixing a description of the regulator with an identifier. This would make it hard to compare regulators for equality if, say, it was the same regulator but they had different telephone numbers for different countries (I know this wouldn't normally make sense, but I can imagine some weird cases where you'd have cross country regulators.)
Re:at a quick glance...
drhyde on 2004-09-23T13:21:28
The only cases I can think of are the North American Numbering Plan (NANP), but the intention is to put generic NANP-ish stuff in N::P::NANP with country-specific subclasses; and Russia/Kazakhstan which share +7.