Changeset 6325 for lang/perl/Mail-Address-MobileJp/branches
- Timestamp:
- 02/07/08 14:44:48 (5 years ago)
- Location:
- lang/perl/Mail-Address-MobileJp/branches/add_is_airh
- Files:
-
- 2 modified
-
lib/Mail/Address/MobileJp.pm (modified) (4 diffs)
-
t/01_mobile.t (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Mail-Address-MobileJp/branches/add_is_airh/lib/Mail/Address/MobileJp.pm
r5268 r6325 8 8 require Exporter; 9 9 @Mail::Address::MobileJp::ISA = qw(Exporter); 10 @Mail::Address::MobileJp::EXPORT = qw(is_mobile_jp is_imode is_vodafone is_ezweb is_softbank );10 @Mail::Address::MobileJp::EXPORT = qw(is_mobile_jp is_imode is_vodafone is_ezweb is_softbank is_airh); 11 11 } 12 12 … … 76 76 )$@x; # end of qr@@ 77 77 78 my $regex_airh = qr@^(?: 79 pdx\.ne\.jp| 80 d.\.pdx\.ne\.jp| 81 wm\.pdx\.ne\.jp 82 )$@x; # end of qr@@ 78 83 79 84 sub is_imode { … … 92 97 my $domain = _domain(shift); 93 98 return $domain && $domain =~ /$regex_ezweb/o; 99 } 100 101 sub is_airh { 102 my $domain = _domain(shift); 103 return $domain && $domain =~ /$regex_airh/o; 94 104 } 95 105 … … 175 185 can be an email string or Mail::Address object. 176 186 187 =item is_airh 188 189 $bool = is_airh($email); 190 191 returns whether C<$email> is a airh email address or not. C<$email> 192 can be an email string or Mail::Address object. 193 177 194 =back 178 195 -
lang/perl/Mail-Address-MobileJp/branches/add_is_airh/t/01_mobile.t
r5268 r6325 1 1 use strict; 2 use Test::More tests => 38;2 use Test::More tests => 44; 3 3 4 4 use Mail::Address; … … 26 26 ); 27 27 28 my @ok_airh = ( 29 'foo@pdx.ne.jp', 30 'foo@di.pdx.ne.jp', 31 'foo@wm.pdx.ne.jp', 32 ); 33 28 34 my @ok = ( 29 35 @ok_imode, … … 31 37 @ok_ezweb, 32 38 @ok_softbank, 39 @ok_airh, 33 40 'foo@mnx.ne.jp', 34 41 'foo@bar.mnx.ne.jp', … … 72 79 } 73 80 81 for my $ok (@ok_airh) { 82 ok is_airh($ok), "$ok"; 83 } 84 74 85 for my $ok (@ok) { 75 86 ok is_mobile_jp($ok), "$ok";
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)