NAME

Number::Phone::NO - Norwegian subclass of Number::Phone

VERSION

This document describes Number::Phone::NO version 0.05

SYNOPSIS

  use Number::Phone;
  use Number::Phone::NO;

  Number::Phone::NO::is_valid("+47 2234 5123")

  $s = Number::Phone::NO::format("2234 5123");
  # $s eq "+47 22 34 51 23"
  
  

DESCRIPTION

Number::Phone::NO tries to provide the Number::Phone framework with support for norwegian phone numbers. Its data is based on the number plans provided by Post- og teletilsynet, which is a govermental institution.

INTERFACE

CONSTRUCTORS

new $nr

Takes a number as its only argument, returning a blessed object if the number is valid, or undef on invalid.

METHODS

areacode

Never returns anything, as we do not have reliable area-codes in Norway.

format

Formats the numbers according to Post- og teletilsynets recomendations.

operator

Returns the company that has been assigned the range the number lives in. Due to portability of numbers in Norway, this may no longer be the right operator.

country_code

Returns 47, which is the norwegian country code

location

Never returns anything since there is no way to tell from the public information.

regulator

Always returns Post- og teletilsynet

subscriber

Returns the 3-8 digits part of the phonenumer that isn't the country_code

areaname

Returns the name of the area the number was originaly allocated for. Due to number portability, this may no longer be the right area.

BOOLEAN METHODS

We implement every method that Number::Phone requires, but not all return useful information.

is_adult

Returns true for numbers in the ranges marked as premium rate services

is_allocated

Returns true for all numbers in ranges not marked as reserve or available

is_corporate

Always returns undef, as the data is inconclusive.

is_fixed_line

Always returns undef, as the data is inconclusive.

is_geographic

Always returns undef, as the data is inconclusive.

is_ipphone

Returns true for numbers within the ranges marked with IP

is_mobile

Returns true for numbers within tanges marked with GSM

is_network_service

Returns true for numbers in the 100-199 range, which includes emergency service etc.

is_pager

Returns undef, as the data is inconclusive.

is_personal

Returns undef, as the data is inconclusive.

is_specialrate

Returns true for numbers that are marked as some type of rate in the data

is_tollfree

Returns true for numbers marked as reversed charge

is_valid

Returns true if the number falls within a range.

CONFIGURATION AND ENVIRONMENT

Number::Phone::NO requires no configuration files or environment variables.

BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to bug-number-phone-no@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Andreas Marienborg <andreas@startsiden.no>

LICENCE AND COPYRIGHT

Copyright (c) 2007, Andreas Marienborg <andreas@startsiden.no>. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.