Mail::Spool::Handle - Mail Spool directory encapsulization
#!/usr/bin/perl -w package MySpoolHandle; use Mail::Spool::Handle; @ISA = qw(Mail::Spool::Handle); # OR sub new { my $self = __PACKAGE__->SUPER::new(@_); ### do my own stuff here return $self; }
Mail::Spool::Handle is intended as an encapsulization of a directory for use by Mail::Spool. It has been written with the intent of being able to use a database or other "file" system as a backend.
Properties of Mail::Spool::Handle are accessed methods of the same name. They may be set by calling the method and passing the new value as an argument. For example:
my $spool_dir = $self->spool_dir; $self->spool_dir($new_spool_dir);
The following properties are available:
Path to the directory of this spool.
Path to the directory of the fallback spool, used if a node could could not be delivered. If undef, it is assumed that that message is undeliverable.
Number of seconds which a node must be present in the spool before it can be sent.
An open directory handle to spool_dir.
Return the spool that created this msh object.
Returns a Mail::Spool::Handle object. Arguments in the form of a hash or hash ref are used to populate the object.
Opens a directory handle on spool_dir and stores the result in dh.
Essentially does a readdir on the dh property. Returns a Mail::Spool::Node object. Once there are no more nodes, it returns undef.
Calls &Mail::Spool::mail_spool_node by default. Returns a Mail::Spool::Node.
Please see also Mail::Spool, Mail::Spool::Node.
Copyright (C) 2001, Paul T Seamons paul@seamons.com http://seamons.com/ This package may be distributed under the terms of either the GNU General Public License or the Perl Artistic License All rights reserved.
To install Mail::Spool, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mail::Spool
CPAN shell
perl -MCPAN -e shell install Mail::Spool
For more information on module installation, please visit the detailed CPAN module installation guide.