Which of these two fragments is more readable?
$self->{catalina_base} = $ENV{'CATALINA_BASE'}; if (!defined $self->{catalina_base}) { $self->{catalina_base} = $self->getTomcatHome() ; } if (!defined $self->{catalina_base}) { CCM::Util::error ("CATALINA_BASE unset and TOMCAT_HOME undefined", 3); }
or
$self->{catalina_base} = $ENV{'CATALINA_BASE'} || $self->getTomcatHome() || CCM::Util::error ("CATALINA_BASE unset and TOMCAT_HOME undefined", 3);
Update: or
$self->{catalina_base} = ( $ENV{'CATALINA_BASE'} or $self->getTomcatHome() or CCM::Util::error ("CATALINA_BASE unset and TOMCAT_HOME undefined", 3) );