Mail::Action::Storage - manages storage for Mail::Action and descendants
use base 'Mail::Action::Storage';
Mail::Action::Storage is a parent class for Mail::Action users that need to store data between invocations. You must subclass this module for your own needs. See Mail::SimpleList::Aliases or Mail::TempAddress::Addresses for more ideas.
Creates a new Mail::Action::Storage object. The single argument is required; without it, this will throw an exception.
$storage_dir should be a directory where to store data files. Beware that in filter mode, relative paths can be terribly ambiguous.
Returns the name of the class for which this class stores data. For example, Mail::TempAddress::Addresses returns
You must override this, as this returns a blank string. It may throw an exception in the future, just to make sure.
Returns the storage directory set in the constructor.
Returns the extension of the generated address files. By default, this is
mas. Note that the leading period is not part of the extension. You'll want to override this.
Given the name of a file (but not a filename), returns the path and full name of the file as it will be saved on disk. This is an internal method and you probably don't need to override it unless you're doing something quite wacky.
Creates a new object of the class you're storing. This is an empty method. You must override this in your subclass.
Returns whether a stored object of the given name exists.
Saves a stored object provided as
$object with the name given in
Creates and returns a stored object represented by the given name. This will return nothing if the object does not exist.
email@example.com, with helpful suggestions from friends, family, and peers.
No plans. It's pretty nice as it is.
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.