Subject: | Data in the optional hash not being used by add_data |
The bug exists in the code for:
$tar->add_data ( $filename, $data, [$opthashref] )
The values passed in $opthashhash doesn't get used when storing the data in the in-memory `archive. The errors are in the _new_from_data subroutine in Archive::Tar::File.pm. The last version that this appears to have worked is v0.23. Included is a diff for the fix based on the v1.07 code.
# diff /usr/lib/perl5/site_perl/5.8.0/Archive/Tar/File.pm.bad
/usr/lib/perl5/site_perl/5.8.0/Archive/Tar/File.pm.works
280,281c280,281
< next unless exists $obj->{key};
< $obj->{$key} = $opt->{key};
---
Show quoted text
> next unless exists $obj->{$key};
> $obj->{$key} = $opt->{$key};
Cheers,
-Hugh