Mail::Action::Address - roles applicable to individual addresses


    use Mail::Action::Address;

    use Class::Roles
        does => 'address_expires',
        does => 'address_named',
        does => 'address_described';


Most Mail::Action users operate around the idea of unique, lightweight e-mail addresses, whether unique names within a subdomain, uniquely keyed variants of a single address, or some combination of the two.

This class defines certain behavior and data storage features of those addresses. Use Class::Roles to add these features to your own Address classes.



Allows Address instances to have an optional expiration date. This adds two method to the class to which you apply it:

expires( $timestring )

Gets and sets the time at which this Address will expire. Set this time in a simple text string, such as 7d2h. Valid time units are:

  • m, for minute. This is sixty (60) seconds.

  • h, for hour. This is sixty (60) minutes.

  • d, for day. This is twenty-four (24) hours.

  • w, for week. This is seven (7) days.

  • M, for month. This is thirty (30) days.

    The returned time is in epoch seconds.

* process_time( $timestring )

Turns a $timestring into the number of seconds it represents.


Allows Address instances to have a name. This adds one method to the class to which you apply it:

name( $name )

Gets and sets the name associated with this Address. This method strips the name of all non-alphanumeric characters, including spaces and punctuation.


Allows Address instances to have a one-sentence description. This adds one method to the class to which you apply it:

description( $description )

Gets and sets the description of this Address. This will return the empty string if there is no description.


chromatic, chromatic at wgz dot org


No known bugs.


Class::Roles, Mail::TempAddress::Address, Mail::SimpleList::Alias.


Copyright (c) 2003 - 2009 chromatic. Some rights reserved. You may use, modify, and distribute this module under the same terms as Perl 5.10 itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 120:

Expected text after =item, not a bullet