[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omaha.pm] Using ||



Brian Edwards wrote:
what's more readable?

$o_RS->determine_room_type($req_room_type) ||
$o_RS->determine_room_type();

$o_RS->determine_room_type($req_room_type) || $o_RS->determine_room_type();

$o_RS->determine_room_type($req_room_type) || $o_RS->determine_room_type();

hope they don't line wrap
(1 \n after or)
(2 \n before or)
(3 \n after and indented 2 \x20)

http://perldoc.perl.org/perlstyle.html

Without context I vote for option 1. Perhaps perlstyle agrees with me under the "Line up corresponding items vertically" rule?

j