summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2020-01-14 13:07:52 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2020-01-14 13:07:52 (GMT)
commit54204eceb2ae19a0ec9f86f65d8f0fe44569f518 (patch) (side-by-side diff)
treec4f775346be47f04d73a477c8ea166cb7e9e7f9b
parent6462707df92c153e78434d98a1b735fcd2fba7af (diff)
downloadacmeman-54204eceb2ae19a0ec9f86f65d8f0fe44569f518.tar.gz
acmeman-54204eceb2ae19a0ec9f86f65d8f0fe44569f518.tar.bz2
Minor changes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--lib/App/Acmeman/Apache/Layout.pm4
-rw-r--r--lib/App/Acmeman/Source/Default.pm5
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/App/Acmeman/Apache/Layout.pm b/lib/App/Acmeman/Apache/Layout.pm
index 5c6d191..c4b47ad 100644
--- a/lib/App/Acmeman/Apache/Layout.pm
+++ b/lib/App/Acmeman/Apache/Layout.pm
@@ -88,9 +88,7 @@ sub detect {
foreach my $mod ($class->modules) {
debug(3, "trying layout module $mod");
- my $obj;
- eval { $obj = $mod->new($ap) };
- if ($obj) {
+ if (my $obj = eval { $mod->new($ap) }) {
return $obj;
}
if ($@) {
diff --git a/lib/App/Acmeman/Source/Default.pm b/lib/App/Acmeman/Source/Default.pm
index 9f9bd86..306a867 100644
--- a/lib/App/Acmeman/Source/Default.pm
+++ b/lib/App/Acmeman/Source/Default.pm
@@ -4,11 +4,10 @@ use warnings;
use parent 'App::Acmeman::Source';
sub new {
- my $self;
shift; # Skip class name.
- eval {
+ my $self = eval {
require App::Acmeman::Source::Apache;
- $self = new App::Acmeman::Source::Apache(@_);
+ new App::Acmeman::Source::Apache(@_);
};
if ($@) {
(my $s = $@) =~ s{ at /.+$}{};

Return to:

Send suggestions and report system problems to the System administrator.