FAQ

[demerphq - Thu Sep 22 11:31:01 2005]:

This is a bug report for perl from demerphq@gmail.com,
generated with the help of perlbug 1.35 running under perl v5.8.6.
-----------------------------------------------------------------
[Please enter your report here]

Attached is test case that when run under Test::Harness and
Devel::Cover will cause Carp to go into infinite recursion. Also
attached is a patch to Carp which will prevent the infinite
recursion. (Apparently defined() will trigger the overload, but ref()
will not)

The combination of Devel::Cover, Test::Harness, overloading and if
modifiers cause overloading to be triggered, which in this case
results in Carp going haywire.

The first set of output is without Devel::Cover, the second is with
it. For some reason overloading is triggered by the if modifier; the
same statement with if () BLOCK doesnt trigger the overloading.

Anyway, ive cc'ed this to the three parties who seem to be involved.
Sorry for the noise if that was wrong.

Example output:

D:\dev\DC_test\Dummy>set HARNESS_PERL_SWITCHES=

D:\dev\DC_test\Dummy>nmake test

Microsoft (R) Program Maintenance Utility Version 7.00.9955
Copyright (C) Microsoft Corporation. All rights reserved.

D:\ASPerl\811\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t\Dummy.t
t\Dummy....ok
All tests successful.
Files=1, Tests=3, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00
CPU)

D:\dev\DC_test\Dummy>set HARNESS_PERL_SWITCHES=-MDevel::Cover

D:\dev\DC_test\Dummy>nmake test

Microsoft (R) Program Maintenance Utility Version 7.00.9955
Copyright (C) Microsoft Corporation. All rights reserved.

D:\ASPerl\811\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib\lib', 'blib\arch')" t\Dummy.t
t\Dummy....ok 2/3
The overloaded method bool was called at t\Dummy.t line 11
T::__ANON__[t\Dummy.t:11]('T=HASH(0x2296364)', 'undef', '')
called at D:\dev\DC_test\Dummy\blib\lib/Dummy.pm line 20
Dummy::test('T=HASH(0x2296364)') called at t\Dummy.t line 5
# Looks like you planned 3 tests but only ran 2.
# Looks like your test died just after 2.
t\Dummy....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 3
Failed 1/3 tests, 66.67% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t\Dummy.t 255 65280 3 2 66.67% 3
Failed 1/1 test scripts, 0.00% okay. 1/3 subtests failed, 66.67% okay.
NMAKE : fatal error U1077: 'D:\ASPerl\811\bin\perl.exe' : return code
'0x2'
Stop.

D:\dev\DC_test\Dummy>
Thanks! I applied this as change #25679.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl5-porters @
categoriesperl
postedOct 2, '05 at 1:17p
activeOct 2, '05 at 1:17p
posts1
users1
websiteperl.org

1 user in discussion

Steve Peters via RT: 1 post

People

Translate

site design / logo © 2022 Grokbase