Changeset 1934

Show
Ignore:
Timestamp:
09/07/06 14:12:21
Author:
miyagawa
Message:

is_vodafone and is_softbank is now aliased

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Mail-Address-MobileJp/trunk/Changes

    r1902 r1934  
    11Revision history for Perl extension Mail::Address::MobileJp. 
     2 
     30.07  Thu Sep  7 14:10:56 JST 2006 
     4        * Now is_softbank is an alias to is_vodafone. foo@softbank.ne.jp returns 1 on is_vodafone 
     5          (Thanks to Livedoor Mobile folks) 
    26 
    370.06  Tue Aug  1 13:14:51 JST 2006 
  • Mail-Address-MobileJp/trunk/lib/Mail/Address/MobileJp.pm

    r1902 r1934  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = '0.06'; 
     5$VERSION = '0.07'; 
    66 
    77BEGIN { 
     
    6666my $regex_vodafone = qr@^(?: 
    6767jp\-[dhtckrnsq]\.ne\.jp| 
    68 [dhtckrnsq]\.vodafone\.ne\.jp 
     68[dhtckrnsq]\.vodafone\.ne\.jp| 
     69^softbank\.ne\.jp 
    6970)$@x; # end of qr@@ 
    70  
    71 my $regexp_softbank = qr@^softbank\.ne\.jp$@; 
    7271 
    7372my $regex_ezweb = qr@^(?: 
     
    8786} 
    8887 
    89 sub is_softbank { 
    90     my $domain = _domain(shift); 
    91     return $domain && $domain =~ /$regexp_softbank/o; 
    92 
     88*is_softbank = \&is_vodafone; 
    9389 
    9490sub is_ezweb { 
     
    9995sub is_mobile_jp { 
    10096    my $domain = _domain(shift); 
    101     return $domain && $domain =~ /(?:$regex_imode|$regex_vodafone|$regex_ezweb|$regex_mobile|$regexp_softbank)/o; 
     97    return $domain && $domain =~ /(?:$regex_imode|$regex_vodafone|$regex_ezweb|$regex_mobile)/o; 
    10298} 
    10399 
  • Mail-Address-MobileJp/trunk/t/01_mobile.t

    r1895 r1934  
    11use strict; 
    2 use Test::More tests => 32
     2use Test::More tests => 36
    33 
    44use Mail::Address; 
     
    1212    'foo@jp-d.ne.jp', 
    1313    'foo@d.vodafone.ne.jp', 
     14    'foo@softbank.ne.jp', 
    1415); 
    1516 
     
    2122my @ok_softbank = ( 
    2223    'foo@softbank.ne.jp', 
     24    'foo@d.vodafone.ne.jp', 
    2325); 
    2426