Mail::TempAddress::Addresses - manages Mail::TempAddress::Address objects


Mail-TempAddress documentation  | view source Contained in the Mail-TempAddress distribution.

Index


NAME

Top

Mail::TempAddress::Addresses - manages Mail::TempAddress::Address objects

SYNOPSIS

Top

use Mail::TempAddress::Addresses; my $addresses = Mail::TempAddress::Addresses->new( '.addresses' );

DESCRIPTION

Top

Mail::TempAddress::Addresses manages the creation, loading, and saving of Mail::TempAddress::Address objects. If you'd like to change how these objects are managed on your system, subclass or reimplement this module.

METHODS

Top

* new( [ $address_directory ] )

Creates a new Mail::TempAddress::Addresses object. The single argument is optional but highly recommended. It should be the path to where Address data files are stored. Beware that in filter mode, relative paths can be terribly ambiguous.

If no argument is provided, this will default to ~/.addresses for the invoking user.

* storage_dir()

Returns the directory where this object's Address data files are stored.

* storage_extension()

Returns the extension of the generated address files. By default, this is mta. Note that the leading period is not part of the extension.

* exists( $address_id )

Returns true or false if an address with this id exists.

* generate_address([ $address_id ])

Generates and returns a new, unique address id. If provided, $address_id will be used as a starting point for the id. It may not be used, though, if an address already exists with that id.

* create( $owner )

Creates and returns a new Mail::TempAddress::Address object, setting the owner. Note that you will need to save() the object yourself, if that's important to you.

* save( $address, $address_name )

Saves a Mail::TempAddress::Address object provided as $address with the given name in $address_name.

* fetch( $address_id )

Creates and returns a Mail::TempAddress::Address object representing this address id. This will return nothing if the address does not exist.

AUTHOR

Top

chromatic, chromatic@wgz.org, with helpful suggestions from friends, family, and peers.

BUGS

Top

None known.

TODO

Top

No plans. It's pretty nice as it is.

SEE ALSO

Top

Mail::Action::Storage, the parent class of this module.

James FitzGibbon's Mail::TempAddress::Addresses::Purgeable, an example of subclassing this class.

COPYRIGHT

Top


Mail-TempAddress documentation  | view source Contained in the Mail-TempAddress distribution.