Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: razvan.mihai [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.28
Fixed in: (no value)



Subject: Archive::Tar::write('file_name') should close or return file handle.
Dear Archive-Tar maintainers, when passed a file name, the C<write()> method should close or at least return the corresponding file handle. The current implementation, as I understand it by looking at the code, leaves this handle openned and returns "1" if successful. This causes troubble if the newly created tar file is to be copied/moved further down the program. Thanks for listening, R.
Thanks for reporting. This got fixed with the following patch as change 12384: ==== //member/kane/archive-tar-new/lib/Archive/Tar.pm#96 - /Users/kane/sources/p4/ other/archive-tar-new/lib/Archive/Tar.pm ==== 997a998 Show quoted text
>
999c1000 < return length($file) ? 1 --- Show quoted text
> my $rv = length($file) ? 1
1001c1002,1007 < : do { seek $handle, 0, 0; local $/; <$handle> } --- Show quoted text
> : do { seek $handle, 0, 0; local $/; <$handle> }; > > ### make sure to close the handle; > close $handle; > > return $rv;