http://www.perlmonks.org?node_id=990411


in reply to Re: undef is undef
in thread undef is undef

Well, even for one level it is necessary to check first. here's real world example:

my $avatar = $usr->person->avatar;

usr and person (extended information about user) are two tables. not every user has to have extended information and the code snipped just wants to find out if user has avatar.

Adding accessor to usr sounds like a wise solution to hide test ifs, but it will mask the fact that avatar is accessor of person.