Acme-Archive-Mbox

 view release on metacpan or  search on metacpan

lib/Acme/Archive/Mbox.pm  view on Meta::CPAN

    my $mboxname = shift;

    my $mgr = Mail::Box::Manager->new;
    my $folder = $mgr->open($mboxname, type => 'mbox') or die "Could not open $mboxname";
    my @messages = $folder->messages;
    for my $message (@messages) {
        my %attr;
        my $name = $message->get('Subject');
        for (qw/uid gid mode mtime/) {
            $attr{$_} = $message->get("X-AAM-$_");
        }
        my $contents = ($message->parts())[1]->decoded();

        $self->add_data($name, $contents, %attr);
    }
    $mgr->close($folder);
}

=head1 AUTHOR

Ian Kilgore, C<< <iank at cpan.org> >>

=head1 BUGS

=over 4

=item Undefined behavior in spades.  Anyone using this probably deserves it.

=item Fails to overwrite or truncate when creating archives

=item As Acme::Archive::Mbox does not store directories, directory
mode and ownership will not be preserved.

=back

=head1 SUPPORT

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

    perldoc Acme::Archive::Mbox


You can also look for information at:

=over 4

=item * RT: CPAN's request tracker

L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-Archive-Mbox>

=item * AnnoCPAN: Annotated CPAN documentation

L<http://annocpan.org/dist/Acme-Archive-Mbox>

=item * CPAN Ratings

L<http://cpanratings.perl.org/d/Acme-Archive-Mbox>

=item * Search CPAN

L<http://search.cpan.org/dist/Acme-Archive-Mbox/>

=back


=head1 ACKNOWLEDGEMENTS


=head1 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.


=cut

1; # End of Acme::Archive::Mbox



( run in 0.847 second using v1.01-cache-2.11-cpan-df04353d9ac )