Subject: | $@ not cleaned up after eval |
This section of code seems to be trying to use future functionality not yet present in IO::Zlib
(tell). I was chasing another bug and getting very confused by this population of $@. Could I
request you cleanup $@ if you expect and/or don't care about failure from this eval?
Patch provided below.
diff --git a/Tar.pm b/Tar.pm
index 82935c9..342085d 100644
--- a/Tar.pm
+++ b/Tar.pm
@@ -318,6 +318,7 @@ sub _read_tar {
while( $handle->read( $chunk, HEAD ) ) {
### IO::Zlib doesn't support this yet
my $offset = eval { tell $handle } || 'unknown';
+ $@ = '';
unless( $read++ ) {
my $gzip = GZIP_MAGIC_NUM;