[Pdx-pm] defined $var->{key} changes $var in to a hashref?
benh
ben.hengst at gmail.com
Mon Feb 22 15:35:26 PST 2010
is this expected? run under perl 5.10.0 :
#!/usr/bin/perl
use strict;
use warnings;
use Test::Most qw{no_plan};
my $var;
eq_or_diff( $var, undef );
ok( ! defined $var->{key} );
eq_or_diff( $var, undef );
__END__
ok 1
ok 2
not ok 3
# Failed test at /tmp/mystry_hash.t line 14.
# +----+-----+----------+
# | Elt|Got |Expected |
# +----+-----+----------+
# * 0|{} |undef *
# +----+-----+----------+
1..3
# Looks like you failed 1 test of 3.
--
benh~
http://three.sentenc.es/
More information about the Pdx-pm-list
mailing list