GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Email::Address::Loose(3) User Contributed Perl Documentation Email::Address::Loose(3)

Email::Address::Loose - Make Email::Address->parse() loose

  my $address = 'read..rfc822.@docomo.ne.jp'; # Email::Addess can't find
  
  use Email::Address::Loose;
  my ($email) = Email::Address::Loose->parse($address); # find!

  use Email::Address;
  use Email::Address::Loose -override;
  my ($email) = Email::Address->parse($address); # find!

Email::Address::Loose is a Email::Address, but "parse()" is "loose" same as Email::Valid::Loose.

This module is for web developers in Japan.

This module is needed because email address by the Japanese mobile carrier was not RFC compliant. Fortunately, this evil spec was changed in April 2009(docomo), October 2009(kddi). However email address that taken before 2009 is still available. So this module is still needed.

ドコモやauがドットを連続で使ったり@マークの直前にドットを置くなど RFC外のメールアドレスを許可していましたが、Email::Addressではそれをメールアドレスと 認識しません。このモジュールはそれらを許可するようにします。 現在はそのようなアドレスは新規に取れないようですが、以前に取ったものは使い続け られているようなので、このモジュールを使っておいた方がいいでしょう。

  my ($email) = Email::Address::Loose->parse('docomo..taro.@docomo.ne.jp');
  print $email->address; # => "docomo..taro.@docomo.ne.jp"
  print $email;          # => "docomo..taro.@docomo.ne.jp" (as_string)
  print $email->user;    # => "docomo..taro."
  print $email->host;    # => "docomo.ne.jp"

Same as Email::Address.

-override
  use Email::Address;
  use Email::Address::Loose -override;
   
  my ($email) = Email::Address->parse('docomo..taro.@docomo.ne.jp');
  print $email->address; # => "docomo..taro.@docomo.ne.jp"
    

Call "globally_override()"(see below) at compile time.

globally_override()
  Email::Address::Loose->globally_override;
    

Changes "Email::Address->parse()" into "Email::Address::Loose->parse()".

globally_unoverride()
  Email::Address::Loose->globally_unoverride;
    

Restores override-ed "Email::Address->parse()".

Email::Address, Email::Valid::Loose - this module based on these.

Email::Address::JP::Mobile - will help you too.

#mobilejp on irc.freenode.net (I've joined as "tomi-ru")

Naoki Tomita <tomita@cpan.org>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2011-02-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.