CC: | chris [...] bingosnet.co.uk |
Subject: | t/madness.t fails under Perl 5.15.7 ("use strict 'refs'" vs. "use strict") |
Under Perl 5.15.7, the Data::Dump::Streamer modules's test suite fails
in t/madness.t. Test #7 expects "use strict 'refs'" but gets "use
strict". See the attached output of "./Build test verbose=1". The
affected code fragment in t/madness.t looks like this:
if ( $] >= 5.012_000 ) {
[...]
CR => sub {
use warnings;
use strict 'refs';
'code';
},
Subject: | Data_Dump_Streamer_Build_test_verbose.txt |
t/madness.t .........
1..7
ok 1 - use Data::Dump::Streamer;
ok 2 - The object isa Data::Dump::Streamer
ok 3 - Madness cap( $qr,$qr )
ok 4 - Total Madness
ok 5 - More Madness
ok 6 - Tye Alias Array
not ok 7 -
Expected:
$HASH1 = {
AR => [
1,
2
],
CR => sub {
use warnings;
use strict 'refs';
'code';
},
FMT => \do{ local *F; my $F=<<'_EOF_FORMAT_'; $F=~s/^\s+# //mg; eval $F; die $F.$@ if $@; *F{FORMAT};
# format F =
# @<<<<<< @││││││ @>>>>>>
# 'left', 'middle', 'right'
# .
_EOF_FORMAT_
},
GLB => *::STDERR,
HR => { key => 'value' },
IO => bless( *{Symbol::gensym()}{IO}, 'IO::File' ),
IV => 1,
NV => 3.14159265358979,
OBJ => bless( qr/("[^"]+")/, 'Zorp' ),
PV => 'string',
PV8 => "ab\ncd\x{20ac}\t",
PVM => '',
RV => \do { my $v = undef },
UND => undef
};
Got:
$HASH1 = {
AR => [
1,
2
],
CR => sub {
use warnings;
use strict;
'code';
},
FMT => \do{ local *F; my $F=<<'_EOF_FORMAT_'; $F=~s/^\s+# //mg; eval $F; die $F.$@ if $@; *F{FORMAT};
# format F =
# @<<<<<< @││││││ @>>>>>>
# 'left', 'middle', 'right'
# .
_EOF_FORMAT_
},
GLB => *::STDERR,
HR => { key => 'value' },
IO => bless( *{Symbol::gensym()}{IO}, 'IO::File' ),
IV => 1,
NV => 3.14159265358979,
OBJ => bless( qr/("[^"]+")/, 'Zorp' ),
PV => 'string',
PV8 => "ab\ncd\x{20ac}\t",
PVM => '',
RV => \do { my $v = undef },
UND => undef
};
+---+
S 1 : 0x95ac498(c 2| 1) Dp: 1 RW Du:1 => $HASH1
S 2 : 0x95bee20(c 3| 1) Dp: 5 RW Du:1 => ${$HASH1->{FMT}} < $HASH1->{FMT} >
S 3 : 0x90fb8b8(c 4| 1) Dp: 5 RW Du:1 => ${$HASH1->{RV}} < $HASH1->{RV} >
-----
R 1 : 0x9563e08(c 2|-1) Dp: 2 Du:1 => $HASH1
R 2 : 0x95aa5b0(c 1|-1) Dp: 4 Du:1 => $HASH1->{AR}
R 3 : 0x94ecad8(c 1|-1) Dp: 4 Du:1 => $HASH1->{CR}
R 4 : 0x95bee20(c 1|-1) Dp: 4 Du:1 => $HASH1->{FMT} < ${$HASH1->{FMT}} >
R 5 : 0x95a4900(c 1|-1) Dp: 4 Du:1 => $HASH1->{HR}
R 6 : 0x8fbf960(c 1|-1) Dp: 4 Du:1 => $HASH1->{IO}
R 7 : 0x95b4688(c 1|-1) Dp: 4 Du:1 => $HASH1->{OBJ}
R 8 : 0x90fb8b8(c 1|-1) Dp: 4 Du:1 => $HASH1->{RV} < ${$HASH1->{RV}} >
R 9 : 0x9563d78(c 3|-1) Dp: 6 Du:1 => ${$HASH1->{FMT}}
+---+
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/7 subtests