#154 Minor bugs in Archive::Tar when creating new archives

Release 5.6.1r*
Bart Lateur

When trying to create a compressed tar file on Mac, I
discovered two small bugs in the MacPerl port of
Archive::Tar - I think it's that version that comes
with MacPerl5.6.1r2. These are:

1) It looks like umask returns undef on MacPerl. I get
a warning for every time I invoke add_data:

Use of unitialized value in integer subtraction (-)
File "...:Archive:Tar.pm'; Line 785

A similar bug must reside in the routine add_files.

2) When I call $tar->write('file.tgz', 1), the
created archive file is of type 'TEXT' (actually a
BBEdit file) -- MacPerl's default for new files. This
is bound to give problems when trying to FTP this file
without thinking. But it isn't very Mac-friendly, anyway.

I'm not sure what it's supposed to be... my file
extensions to type/creator coupling seems to be using
"Gzip" for compressed, ".tgz" and ".gz" files, and
"TARF" for uncompressed ".tar" files.

The latter may even not be considered a bug, but an


  • Chris Nandor

    Chris Nandor - 2003-04-06
    • priority: 5 --> 6
  • Chris Nandor

    Chris Nandor - 2003-04-06

    Logged In: YES

    The latter, I have no plans to address. This happens with
    other things too, and the general "fix" is for the
    programmer to use C<MacPerl::SetFileInfo(...) if $^O eq
    'MacOS'>. Especially since different people would want to
    assign different creators, handling this internally for
    every module would be painful.

    As to the former ... could you try the latest Archive::Tar
    on the CPAN and see how it works for you? It has been
    completely rewritten, and the last I checked, we got it to
    pass all of its tests on Mac OS. So it should work better,
    and if it does not, then we need to find out why, so the
    current developer can fix it. :-)


Log in to post a comment.