Dne Čt 26.úno.2015 02:13:16, SREZIC napsal(a):
Show quoted text
The t/global.t failure can be minimized to:
$ cat /tmp/test
use warnings;
use Data::Dump::Streamer;
my $a;
format g =
@#
$a
.
Dump(*g);
$ perl -Iblib/{lib,arch} /tmp/test
Subroutine B::OP::parent redefined at /usr/lib64/perl5/vendor_perl/B/Utils.pm line 186.
$VAR1 = *::g;
format g =
@#
use warnings;
; $a
.
This was output on perl-5.21.11. Perl 5.20.2 gives:
$ perl -Iblib/{lib,arch} /tmp/test
$VAR1 = *::g;
format g =
@#
$a
.
The bug is triggered by "use warnings". Without it the output is the same.
One would expect "use strict" to work the same way. And indeed adding "use strict" makes the Dump() to print additional "use strict" line. However, adding "no strict" removes the "use strict" from both perls in contrast to "no warnings" which disappears only with the old perl.