Subject: | Dealing with undefined values |
It seems that it's not possible to store an undefined value in a lazy
variable. Both test cases in the following script fail (but it works if
my $undefined=undef is used instead):
#!/usr/bin/perl
use strict;
use warnings;
use Scalar::Defer 'lazy';
use Test::More 'no_plan';
my $undefined = lazy { undef };
ok !defined $undefined;
is $undefined, undef;
__END__
Regards,
Slaven