[Pdx-pm] defined $var->{key} changes $var in to a hashref?
Andy Lester
andy at petdance.com
Mon Feb 22 15:37:44 PST 2010
On Feb 22, 2010, at 5:35 PM, benh wrote:
> eq_or_diff( $var, undef );
>
> ok( ! defined $var->{key} );
>
> eq_or_diff( $var, undef );
Yes, because you're forcing $var to be a hashref because you want to get something out of it. You want to check to see if it's a hashref first.
--
Andy Lester => andy at petdance.com => www.theworkinggeek.com => AIM:petdance
More information about the Pdx-pm-list
mailing list