Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: mark [...] summersault.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.42
Fixed in: (no value)



Subject: Scalar found where operator expected at (eval 158) line 1, near "'int' $__val"
Sometimes I'm getting this output from Test::Harness 2.4 with Perl 5.8.3. If you Google for the string, you'll see a lot of other people are experiencing the same thing. Since it appears to be a test failure, people are mostly (wrongly, I think) reporting it to the software authors instead of here. o Here's the context: # Looks like you planned 18 tests but only ran 17. dubious Test returned status 1 (wstat 256, 0x100) Scalar found where operator expected at (eval 158) line 1, near "'int' $__val" (Missing operator before $__val?) DIED. FAILED test 18 ############ Mysterious.
From: mark [...] summersault.com
Some more detail: In my case it seemed like it might have been related to having a planned test count not match reality. However, I couldn't isolate with a test script that does that: #!/usr/bin/perl use Test::More tests => 2; ok(1);
From: saper [...] cpan.org
I also have this error from time to time when a test fails. Following is a minimal script to reproduce this bug. $ cat test.pl #!/usr/bin/perl use Test::More tests => 1; is(1,0); $ perl -MExtUtils::Command::MM -e 'test_harness(0)' test.pl test....NOK 1 # Failed test (test.pl at line 3) # got: '1' # expected: '0' # Looks like you failed 1 test of 1. test....dubious Test returned status 1 (wstat 256, 0x100) Scalar found where operator expected at (eval 154) line 1, near "'int' $__val" (Missing operator before $__val?) DIED. FAILED test 1 Failed 1/1 tests, 0.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- test.pl 1 256 1 1 100.00% 1 Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay. My Perl and modules version : - Perl v5.8.1 built for i386-linux-thread-multi (RC4) - Test::Harness 2.29 - Test::More 0.51 - ExtUtils::Command::MM 0.03 - ExtUtils::Command 1.07 HTH, Sébastien Aperghis-Tramoni
Date: Thu, 25 Nov 2004 12:28:42 -0500
From: Michael G Schwern <schwern [...] pobox.com>
To: Sébastien Aperghis-Tramoni via RT <bug-Test-Harness [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #7716] Scalar found where operator expected at (eval 158) line 1, near "'int' $__val"
RT-Send-Cc:
On Thu, Nov 25, 2004 at 05:37:39AM -0500, Sébastien Aperghis-Tramoni via RT wrote: Show quoted text
> Scalar found where operator expected at (eval 154) line 1, near "'int' > $__val" > (Missing operator before $__val?)
This is Test::Harness trying to load wait.ph which typically has issues. Despite our best efforts we can't seem to keep some of the warnings from leaking out to the user. You can reproduce the issue without Test::Harness by simply running "require 'wait.ph'". -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern/ I hate war as only a soldier who has lived it can, only as one who has seen its brutality, its stupidity. -- Dwight D. Eisenhower
Fixed in 2.45_01. I'm yanking this piece of functionality.