Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: blair [...] orcaware.com
Cc:
AdminCc:

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



Subject: make test warnings in 1.06 but not 1.05
Testing Archive::Tar 1.06 on RedHat 9 with my own compiled Perl 5.8.1 I get these warnings: PERL_DL_NONLAZY=1 /opt/i386-linux/installed/perl-5.8.0/bin/perl5.8.0 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01_use........ok t/02_methods....ok 36/0binmode() on unopened filehandle GEN6 at /export/home1/blair/.cpan/Archive-Tar-1.06/blib/lib/Archive/Tar.pm line 188. t/02_methods....ok 38/0binmode() on unopened filehandle GEN8 at /export/home1/blair/.cpan/Archive-Tar-1.06/blib/lib/Archive/Tar.pm line 188. t/02_methods....ok 40/0binmode() on unopened filehandle GEN9 at /export/home1/blair/.cpan/Archive-Tar-1.06/blib/lib/Archive/Tar.pm line 188. t/02_methods....ok All tests successful. Files=2, Tests=72, 1 wallclock secs ( 0.21 cusr + 0.05 csys = 0.26 CPU) These warnings weren't there with Archive::Tar 1.05. Best, Blair % perl -V Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.20-18.9, archname=i686-linux-thread-multi uname='linux orcaware.com 2.4.20-18.9 #1 thu may 29 07:08:16 edt 2003 i686 i686 i386 gnulinux ' config_args='-Dprefix=/opt/i386-linux/installed/perl-5.8.0 -Dcc=/opt/i386-linux/gcc/bin/gcc -Doptimize=-O3 -march=i386 -mcpu=i686 -Uinstallusrbinperl -Ulocincpth -Duseshrplib -Dcf_email=blair@orcaware.com -Ui_db -Uversiononly -Ubincompat5005 -Dusethreads -Duseithreads -Dlibpth=/lib /usr/lib -Dlibspath=/lib /usr/lib -Dd_dosuid' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='/opt/i386-linux/gcc/bin/gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O3 -march=i386 -mcpu=i686', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -I/usr/include/gdbm' ccversion='', gccversion='3.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='/opt/i386-linux/gcc/bin/gcc', ldflags ='' libpth=/lib /usr/lib libs=-lnsl -lgdbm -ldl -lm -lpthread -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic -Wl,-rpath,/opt/i386-linux/installed/perl-5.8.0/lib/5.8.0/i686-linux-thread-multi/CORE' cccdlflags='-fpic', lddlflags='-shared' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Locally applied patches: ActivePerl Build 806 Built under linux Compiled at Jun 25 2003 17:38:15 @INC: /opt/i386-linux/installed/perl-5.8.0/lib/5.8.0/i686-linux-thread-multi /opt/i386-linux/installed/perl-5.8.0/lib/5.8.0 /opt/i386-linux/installed/perl-5.8.0/lib/site_perl/5.8.0/i686-linux-thread-multi /opt/i386-linux/installed/perl-5.8.0/lib/site_perl/5.8.0 /opt/i386-linux/installed/perl-5.8.0/lib/site_perl .
Looking at the new code, @@ -177,6 +184,8 @@ } else { $fh = new IO::File; + + binmode $fh; } } It looks like $fh doesn't refer to an open file, so calling binmode here isn't valid. Maybe wait till the file is actually opened? Best, Blair
[guest - Wed Oct 15 17:40:07 2003]: Show quoted text
> Looking at the new code, > @@ -177,6 +184,8 @@ > > } else { > $fh = new IO::File; > + > + binmode $fh; > } > } > > It looks like $fh doesn't refer to an open file, so calling binmode > here isn't valid. Maybe wait till the file is actually opened? > > Best, > Blair
Yes. Removing that line and adding the binmode right after the open seems to fix: binmode $fh if ref( $fh ) eq 'IO::File'; Without the ugly ref (or other) test, IO::Zlib chokes on the binmode. Jos may provide a slightly different fix when he wakes up (I expect he is sleeping now :-). /-\
Date: Thu, 16 Oct 2003 10:41:28 +0200
Subject: Re: [cpan #4119] make test warnings in 1.06 but not 1.05
From: "Jos I. Boumans" <kane [...] dwim.org>
To: bug-Archive-Tar [...] rt.cpan.org
RT-Send-Cc:
On Thursday, October 16, 2003, at 01:21 AM, via RT wrote: Show quoted text
>> It looks like $fh doesn't refer to an open file, so calling binmode >> here isn't valid. Maybe wait till the file is actually opened?
Show quoted text
> Yes. Removing that line and adding the binmode right after the open > seems to fix: > binmode $fh if ref( $fh ) eq 'IO::File'; > Without the ugly ref (or other) test, IO::Zlib chokes on the binmode. > Jos may provide a slightly different fix when he wakes up (I expect > he is sleeping now :-).
and should have been when he applied the patch -- never write code if you're too sleepy to sit up straight shall my new motto be ;) sorry for the goof up, i think this patch should rectify the mistake: ==== //member/kane/archive-tar-new/lib/Archive/Tar.pm#43 (text) ==== 172c172 < my $fh; --- Show quoted text
> my $fh; my $bin;
187,188c187 < < binmode $fh; --- Show quoted text
> $bin++;
196a196,197 Show quoted text
> binmode $fh if $bin; >
andrew: if you have the extended tests for this ready, i can ship a 1.07 with this annoying warning fixed. Thanks, -- Jos Boumans 'Real programmers use "cat > a.out"' CPANPLUS http://cpanlus.sf.net