Skip Menu |

This queue is for tickets about the Test-Taint CPAN distribution.

Report information
The Basics
Id: 51246
Status: resolved
Priority: 0/
Queue: Test-Taint

People
Owner: Nobody in particular
Requestors: mkanat [...] cpan.org
Cc:
AdminCc:

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



Subject: Loading Test::Taint throws a warning
In my environment, if I "use Test::Taint", I get the following warning: Use of uninitialized value in open at /opt/perl-5.10.0/lib/site_perl/5.10.0/i386-linux-thread-multi/Test/Taint.pm line 334, <DATA> line 228. This is rather important as my continuous integration system then thinks that my tests have possibly failed, since there is output on stderr.
Interestingly, this currently seems to only be happening on my 5.10.0 installation.
Subject: [rt.cpan.org #51246] Loading Test::Taint throws a warning
Date: Mon, 03 Sep 2012 20:01:41 +0200
To: bug-Test-Taint [...] rt.cpan.org
From: "Frédéric Buclin" <lpsolit [...] gmail.com>
I can reproduce with Perl 5.14.2, so this is not specific to 5.10.
Subject: [rt.cpan.org #51246] Loading Test::Taint throws a warning
Date: Thu, 18 Oct 2012 13:59:03 +0200
To: bug-Test-Taint [...] rt.cpan.org
From: "Frédéric Buclin" <lpsolit [...] gmail.com>
The fix is simple. In Test/Taint.pm line 334, simply add: next unless defined $_; So the patch is: --- Test/Taint.pm 2012-10-18 13:56:03.824894734 +0200 +++ Test/Taint.pm 2012-10-18 13:56:14.514649417 +0200 @@ -331,6 +331,7 @@ BEGIN { # (Yes, even reading from /dev/null works!) local(*FOO); for ( qw(/dev/null / . ..), values %INC, $0, $^X ) { + next unless defined $_; if ( open FOO, $_ ) { my $data; if ( defined sysread FOO, $data, 1 ) { Andy, could you commit this patch and release a new version, please? Thanks! LpSolit
This is fixed in 1.06, which should ship today. https://github.com/petdance/test-taint