1NAME 2 Parse::PhoneNumber - Parse Phone Numbers 3 4SYNOPSIS 5 use Parse::PhoneNumber; 6 my $number = Parse::PhoneNumber->parse( number => $phone ); 7 8 print $number->human; 9 10ABSTRACT 11 Parse phone numbers. Phone number have a defined syntax (to a point), so 12 they can be parsed (to a point). 13 14DESCRIPTION 15 Methods 16 new 17 Create a new Parse::PhoneNumber object. Useful if a lot of numbers have 18 to be parsed. 19 20 parse 21 Accepts a list of arguments. "number" is the phone number. This method 22 will return "undef" and set "errstr" on failure. On success, a 23 "Parse::PhoneNumber::Number" object is returned. "assume_us" will have 24 the country code default to 1 if none is given. This is due to the fact 25 that most people in the US are clueless about such things. 26 27 errstr 28 Returns the last error reported, or undef if no errors have occured yet. 29 30 Parse::PhoneNumber::Number Objects 31 The objects returned on a successful parse. 32 33 orig 34 The original string passed to "parse". 35 36 cc 37 The Country Code 38 39 num 40 The phone number, including the trunk pointer, area code, and subscriber 41 number. 42 43 ext 44 An extension, if one is present. 45 46 opensrs 47 The format an OpenSRS Registrar must make a phone number for some TLDs. 48 49 human 50 Human readable format. 51 52BUGS 53 Currently only accept phone numbers in International format. If a number 54 isn't given in international format, a false positive could occur. 55 56 Please report bugs to the CPAN RT instance at 57 <https://rt.cpan.org/Dist/Display.html?Queue=Parse-PhoneNumber> 58 59SEE ALSO 60 Number::Phone 61 62AUTHOR 63 Casey West <casey@geeknest.com> 64 65 Maintained by Tim Wilde <cpan@krellis.org> 66 67COPYRIGHT 68 Copyright (c) 2003 Casey West <casey@geeknest.com>. 69 70 Portions Copyright (c) 2005 Dynamic Network Services, Inc. 71 72 Portions Copyright (c) 2011 Tim Wilde 73 74 Portions Copyright (c) 2012 Google, Inc. 75 76 All rights reserved. 77 78 This program is free software; you can redistribute it and/or modify it 79 under the same terms as Perl itself. 80 81