NAME

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

SYNOPSIS

use Mail::Action::Address;

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

DESCRIPTION

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.

ROLES

address_expires

Allows Address instances to have an optional expiration date. This adds one method to the class to which it is applied:

  • 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.

      Times are returned in epoch seconds.

address_named

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

  • name( [ $name ] )

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

address_described

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

  • description( [ $description ] )

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

AUTHOR

chromatic, chromatic@wgz.org

BUGS

No known bugs.

SEE ALSO

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

COPYRIGHT

Copyright (c) 2003, chromatic. All rights reserved. This module is distributed under the same terms as Perl itself, in the hope that it is useful but certainly under no guarantee.