Sendmail::Queue::Df - Represent a Sendmail dfXXXXXX (data) file
use Sendmail::Queue::Df # Create a new df file object my $df = Sendmail::Queue::Df->new(); # Give it an ID $df->set_queue_id( $some_qf->get_queue_id ); # Give it some data directly $df->set_data( $scalar_with_body ); # ... or, give some data from a filehandle $df->set_data_from( $some_fh ); # ... or, hardlink it to another object, or to a pathname $df->hardlink_to( $other_df ); $df->hardlink_to( '/path/to/file' ); # Make sure it's on disk. $df->write( '/path/to/queue');
Sendmail::Queue::Df provides a representation of a Sendmail df (data) file.
Create a new Sendmail::Queue::Df object.
Instead of writing a new data file, hardlink this one to an existing file.
$target can be either a Sendmail::Queue::Df object, or a scalar pathname.
Return the full path name of this data file.
Will return undef if no queue ID exists, and die if queue directory is unset.
Given a filehandle, read the data from it, up to the end of file, and store it in the object.
Write data to df file, if necessary.
Unlink the queue file. Returns true (1) on success, false (undef) on failure.
Unlinking the queue file will only succeed if we have a queue directory and queue ID configured for this object. Otherwise, we fail to delete.
Carp, Scalar::Util, File::Spec, IO::File, Fcntl
There are no known incompatibilities with this module.
There are no known bugs in this module. Please report problems to the author. Patches are welcome.
Dave O'Neill, <support at roaringpenguin.com>
<support at roaringpenguin.com>
Copyright (c) 2007 Roaring Penguin Software, Inc. All rights reserved.
To install Sendmail::Queue, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Sendmail::Queue
CPAN shell
perl -MCPAN -e shell install Sendmail::Queue
For more information on module installation, please visit the detailed CPAN module installation guide.