|Subject:||Archive::Tar doesn’t allow creation of an archive with leading /|
|Date:||Mon, 04 Aug 2014 18:38:33 -0500|
|To:||bug-archive-tar [...] rt.cpan.org|
|From:||Felipe Gasper <felipe [...] felipegasper.com>|
tar archives are capable of storing “/foo/bar” literally -- i.e., with the leading slash -- but this module always strips out the slash. my $tar_obj = Archive::Tar->new(); $tar_obj->add_data( '/foo', 'my data' ); print Dumper $tar_obj->get_files(); … and you’ll see that the prefix is stored as 'foo', not '/foo'. Even if you twiddle with the ::File object and set ->prefix('/foo'), write() will strip it out.