in reply to undef-safe equality
if ( ($ret->{val1}||"") eq ($this->{val1}||"") ) ... [download]
if ( defined($ret->{val1}) == defined($this->{val1}) && ($ret->{val1}||"") eq ($this->{val1}||"") ) ... [download]