Subject: | Can't use string as HASH ref error |
Under Perl 5.16.3, the attached file produces the following error:
% perl foo.pl
Can't use string ("HASH(0x2557300)Nullsv
") as a HASH ref while "strict refs" in use at [...]/lib/site_perl/5.16.3/Devel/OptreeDiff.pm line 132.
Subject: | foo.pl |
use IO::File;
use Devel::OptreeDiff 'fmt_optree_diff';
print map "$_\n", fmt_optree_diff(
sub {
my $code = do {
local $/ = undef;
IO::File->new( 'XS.c', 'r' )->getline;
};
},
sub {
my $code;
{
local $/ = undef;
$code = IO::File->new( 'XS.c', 'r' )->getline;
}
},
);