[Genquire-users] Trying to understand some code

Danny Yoo dyoo@acoma.Stanford.EDU
Wed, 9 Jan 2002 17:54:39 -0800 (PST)


I've been trying to read QueryScreen.pm.  There's a section in the code
that's confusing me a little, in QueryScreen::_assignBindings:

###
return if (!(${$QueryScreen->ToolsHash}{$source}));
return if (${${$QueryScreen->ToolsHash}{$source}->cget('-variable')} eq "off");
###


Is it possible to simplify this as:

###
if ( !($QueryScreen->ToolsHash->{$source})
    || ($QueryScreen->ToolsHash->{$source}->cget('-variable') eq "off") {
    return;
}
###