Skip to content

Instantly share code, notes, and snippets.

@sschober
Created November 1, 2014 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sschober/a1b63e30027c14ac63c0 to your computer and use it in GitHub Desktop.
Save sschober/a1b63e30027c14ac63c0 to your computer and use it in GitHub Desktop.
Looking at things changes things...
use Modern::Perl '2012';
use Test::More;
use Data::Dumper;
my %hash = (
1 => undef
);
ok(! $hash{1}, 'Ok, undef unter Key 1 ist false');
is( ref($hash{1}), '', 'Ok, dort ist auch keine Referenz');
ok(! @{$hash{1}}[0], 'Ok, auch wenn ich so tue als waere ein Array dort');
is( ref($hash{1}), 'ARRAY', 'Ok, jetzt ist dort aber plötzlich ein Array entstanden!');
print Dumper(\%hash);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment