I don't think it's me, but thought I'd see what other eyes see...

Using Archive::Tar, if I create a tar file of a symlink with FOLLOW_SYMLINK = 1, the write fails. Here's the 1-line reproducer. Perl 5.12.4, fedora 15

# touch foo # ln -s foo bar # perl -MArchive::Tar -e'$Archive::Tar::FOLLOW_SYMLINK = 1; my $t = Ar +chive::Tar->new; $t->add_files("bar"); $t->write( "baz.tgz", COMPRESS +_GZIP );print $t->error(1); print $Archive::Tar::VERSION' Could not write data for: bar at -e line 1 Could not write data for: bar at /usr/share/perl5/Archive/Tar.pm line +1293 Archive::Tar::write('Archive::Tar=HASH(0x9dcf90)', 'baz.tgz', +9) called at -e line 1 1.78
The same command adding "foo" instead of bar works. Hard to imagine something so simple being broken - but I can't see what I'm doing wrong!

Thanks for any help.

This communication may not represent my employer's views, if any, on the matters discussed.


In reply to Archive::Tar fails to dereference and save symlinks? by tlhackque

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.