NAME

Number::Phone::RO - Phone number information for Romania (+40)

SYNOPSIS

use Number::Phone::RO;
my $nr = Number::Phone::RO->new('+40250123456');
say $nr->is_geographic;   # 1
say $nr->is_fixed_line;   # 1
say $nr->is_mobile;       # 0
say $nr->is_tollfree;     # 0
say $nr->is_specialrate;  # 0
say $nr->areacode;        # 250
say $nr->areaname;        # Vâlcea
say $nr->subscriber;      # 123456
say $nr->operator;        # (the name of this number's original operator)
say $nr->operator_ported; # (the name of this number's current operator)
say $nr->format;          # +40 250 123 456

DESCRIPTION

See the Number::Phone documentation for usage information. The following methods from Number::Phone are overridden:

is_geographic
is_fixed_line
is_mobile
is_tollfree
is_specialrate
is_adult
country_code

Always returns 40.

regulator

Returns the name and URL of the regulator, ANCOM.

areacode
areaname
operator
operator_ported
subscriber
format

Other methods:

query_portabilitate

Queries http://portabilitate.ro to get the information for the operator and operator_ported methods. The result is cached. Note that failures (such as number invalid, no internet connection) are also cached. Also note that the service rate limits requests. Going over the (unspecified) rate limit causes the service to ask for a captcha (which is interpreted as a failure by this function).

This method is automatically called by operator and operator_ported the first time they are called. A possible reason for calling it explicitly is refreshing the cache.

TODO

Only long (10 digits) numbers are supported.

AUTHOR

Marius Gavrilescu, <marius@ieval.ro>

COPYRIGHT AND LICENSE

Copyright (C) 2015-2016 by Marius Gavrilescu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.20.2 or, at your option, any later version of Perl 5 you may have available.