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


Manual Reference Pages  -  EMAIL::ADDRESSPARSER (3)

.ds Aq ’

NAME

Email::AddressParser - RFC 2822 Address Parsing and Creation

CONTENTS

SYNOPSIS



  use Email::AddressParser;

  my @addresses = Email::AddressParser->parse($line);
  my $address   = Email::AddressParser->new(Tony => tony@localhost);

  print $address->format;



VERSION

version 0.01

DESCRIPTION

This class is a near drop-in replacement for the regex parsing of Email::Address, which has serious issues for production use (exponential to infinite computation time in some cases). It uses code from Mark Crispin’s c-client library to implement the parsing. The resulting parser is much more stable than the regex-based version of Email::Address.

Note, RFC2822 comments are removed by this version (you can pass them in, and you can ask for them, but they will always be empty).

    Class Methods

parse


  my @addrs = Email::Address->parse(
    q[me@local, Tony <me@local>, "Tony" <me@local>]
  );



This method returns a list of Email::Address objects it finds in the input string.

There are no comment nesting limitations on this method, though all comments will be ignored.

new


  my $address = Email::Address->new(undef, tony@local);
  my $address = Email::Address->new(tony kay, tony@local);
  my $address = Email::Address->new(undef, tony@local, (tony));



Constructs and returns a new Email::AddressParser object. Takes four positional arguments: phrase, email, and comment.

    Instance Methods

phrase


  my $phrase = $address->phrase;
  $address->phrase( "Me oh my" );



Accessor for the phrase portion of an address.

address my $addr = $address->address; $addr->address( ‘‘me@PROTECTED.com’’ ); Accessor for the address portion of an address.
comment


  my $comment = $address->comment;
  $address->comment( "(Work address)" );



Accessor for the comment portion of an address. Currently a no-op.

format


  my $printable = $address->format;



Returns a properly formatted RFC 2822 address representing the object.

SEE ALSO

Email::Address.

AUTHOR

Parser by Mark Crispin. Perl integration by Anthony Kay <tkay@cs.uoregon.edu>. Most documentation shamelessly borrowed from Email::Address.

COPYRIGHT

All parsing code is Copyright (c) 1988-2006 University of Washington, under the Apache License 2.0. The Perl integration is licesened under the same terms as Perl itself.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 153: You forgot a ’=back’ before ’=head2’
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 EMAIL::ADDRESSPARSER (3) 2007-03-27

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