Acme-Archive-Mbox
    
    
  
  
  
view release on metacpan or search on metacpan
Revision history for Acme-Archive-Mbox
0.01    2008-11-21/
        First version, released on an unsuspecting (and terrified) world.
lib/Acme/Archive/Mbox.pm view on Meta::CPAN
to be used in the archive.
=cut
sub add_file {
    my $self = shift;
    my $name = shift;
    my $altname = shift || $name;
    my %attr;
    my $contents = read_file($name, err_mode => 'carp', binmode => ':raw');
    return unless $contents;
    my (undef, undef, $mode, undef, $uid, $gid, undef, undef, undef, $mtime) = stat $name;
    $attr{mode} = $mode & 0777;
    $attr{uid} = $uid;
    $attr{gid} = $gid;
    $attr{mtime} = $mtime;
    my $file = Acme::Archive::Mbox::File->new($altname, $contents, %attr);
    push @{$self->{files}}, $file if $file;
( run in 0.952 second using v1.01-cache-2.11-cpan-c333fce770f )