Skip Menu |

This queue is for tickets about the Archive-Tar CPAN distribution.

Report information
The Basics
Id: 4330
Status: resolved
Priority: 0/
Queue: Archive-Tar

People
Owner: Nobody in particular
Requestors: bifrost [...] uswest.net
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.07
Fixed in: (no value)



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
[guest - Sat Nov 8 01:45:32 2003]: Show quoted text
> 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}; > ---
> > next unless exists $obj->{$key}; > > $obj->{$key} = $opt->{$key};
> > Cheers, > -Hugh
Thanks Hugh. This was fixed already in the P4 repository on 29-oct-2003. You can always download the latest Archive::Tar development snapshot from: http://p4.elixus.org/snap/ /-\