http://qs321.pair.com?node_id=291671


in reply to To || or not to or and why.

I want to pass a value to a class method. If the value is undef, then I want it to immediately return undef.

What's wrong with splitting this into two statements?

my $RootDirectoryCandidate = shift(); return unless defined($RootDirectoryCandidate);
You still get the immediate return, the result is more readable, and I really doubt you could measure a performance difference.