The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Acme::Archive::Mbox - Mbox as an archive format.

VERSION

Version 0.01

SYNOPSIS

Uses Mbox as an archive format, like tar or zip but silly. Creates an mbox with one message per file or directory. File contents are stored as an attachment, metadata goes in mail headers.

    use Acme::Archive::Mbox;

    my $archive = Acme::Archive::Mbox->new();
    $archive->add_file('filename');
    $archive->add_data('file/name', $contents);
    $archive->write('foo.mbox');

    ...

    $archive->read('foo.mbox');
    $archive->extract();

FUNCTIONS

new ()

Create an Acme::Archive::Mbox object.

add_data ($name, $contents, %attr)

Add a file given a filename and contents. (File need not exist on disk)

add_file ($name, [$archive_name])

Add a file given a filename. File will be read from disk, leading slashes will be stripped. Will accept an optional alternative filename to be used in the archive.

get_files ()

Returns a list of AAM::File objects.

write (filename)

Write archive to a file

read (filename)

Read archive from a file.

AUTHOR

Ian Kilgore, <iank at cpan.org>

BUGS

Undefined behavior in spades. Anyone using this probably deserves it.
Fails to overwrite or truncate when creating archives
As Acme::Archive::Mbox does not store directories, directory mode and ownership will not be preserved.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Acme::Archive::Mbox

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 Ian Kilgore, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.