.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "Number::Phone::Lib 3pm" .TH Number::Phone::Lib 3pm "2016-12-15" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Number::Phone::Lib \- Instantiate Number::Phone::* objects from libphonenumber .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Number::Phone::Lib; \& \& $daves_phone = Number::Phone::Lib\->new(\*(Aq+442087712924\*(Aq); \& $daves_other_phone = Number::Phone::Lib\->new(\*(Aq+44 7979 866 975\*(Aq); \& # alternatively Number::Phone::Lib\->new(\*(Aq+44\*(Aq, \*(Aq7979 866 975\*(Aq); \& # or Number::Phone::Lib\->new(\*(AqUK\*(Aq, \*(Aq07979 866 975\*(Aq); \& \& if ( $daves_phone\->is_mobile() ) { \& send_rude_SMS(); \& } .Ve .PP This subclass of Number::Phone is used in exactly the same way as the normal Number::Phone, but it exclusively uses classes generated from Google's libphonenumber project . libphonenumber doesn't have enough data to support all the features of Number::Phone, but you might want to use its data and no other for a few reasons: .IP "\(bu" 4 Compatibility with libphonenumber's Java, \*(C+, and JavaScript implementations. .IP "\(bu" 4 Performance. \s-1UK\s0 Number parsing and validation by Number::Phone::UK, in particular, has a substantial overhead thanks to its embedded database. If all you need is simple validation and/or formatting, all that overhead is unnecessary. .PP That said, the core Number::Phone \s-1UK\s0 module is far more comprehensive. .SH "METHODS" .IX Header "METHODS" There is one method, a constructor: .SS "new" .IX Subsection "new" Call this in exactly the same way as you would call \f(CW\*(C`Number::Phone\-\*(C'\fR\fInew()\fR>. The only difference is that you will get stubs back instead of \*(L"full-fat\*(R" objects, even if full-fat classes are available. .SH "LICENCE" .IX Header "LICENCE" You may use, modify and distribute this software under the same terms as perl itself. .SH "AUTHORS" .IX Header "AUTHORS" .IP "\(bu" 4 David Cantrell .IP "\(bu" 4 David E. Wheeler .PP Copyright 2014.