Skip Menu |

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

Report information
The Basics
Id: 9587
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: tasalo [...] almamedia.fi
Cc:
AdminCc:

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



Subject: Test::Harness::Iterator::FH->next() fails under perl 5.005_03
Test::Harness::Iterator::FH->next() (Test/Harness/Iterator.pm version 0.02) tries to use readline() on a reference to a glob. This will fail (at least) on the following platforms: perl 5.005_03 on SunOS 5.7 Generic_106542-32 i86pc i386 i86pc perl 5.005_03 on SunOS 5.7 Generic_106541-32 sun4u sparc SUNW,Ultra-4 Since no input is ever received from readline, following error message is produced: $ prove -d haloo.t # $Test::Harness::Switches: # 1 tests to run haloo....# Command line: '/opt/gnu/bin/perl haloo.t' # Running: /opt/gnu/bin/perl haloo.t # PERL5LIB= # Command line: '/opt/gnu/bin/perl haloo.t' haloo....dubious Test returned status 0 (wstat 13, 0xd) FAILED--1 test script could be run, alas--no output ever seen Exit 2 The quick-and-dirty fix was to dereference the glob in new(), before storing it. This solved the problem for me. (works also under perl5.8 on linux, other platforms not tested.) diff ./lib/Test/Harness/Iterator.pm /opt/gnu/lib/perl5/5.00503/Test/Harness/Iterator.pm 5c5 < $VERSION = 0.02; --- Show quoted text
> $VERSION = 0.02.1;
41c41 < $self->{fh} = $thing; --- Show quoted text
> $self->{fh} = *{$thing};
This bug also causes numerous failures in the pre-install tests of Test::Harness 2.44 under perl 5.005_03. Cheers, -Tuomo Salo