aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2020-01-14 15:07:52 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2020-01-14 15:07:52 +0200
commit54204eceb2ae19a0ec9f86f65d8f0fe44569f518 (patch)
treec4f775346be47f04d73a477c8ea166cb7e9e7f9b
parent6462707df92c153e78434d98a1b735fcd2fba7af (diff)
downloadacmeman-54204eceb2ae19a0ec9f86f65d8f0fe44569f518.tar.gz
acmeman-54204eceb2ae19a0ec9f86f65d8f0fe44569f518.tar.bz2
Minor 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
@@ -85,15 +85,13 @@ sub detect {
if ($ap->status) {
croak "unable to get Apache defaults: " . $ap->error;
}
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 ($@) {
debug(3, "layout module failed: $@");
}
}
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
@@ -1,17 +1,16 @@
package App::Acmeman::Source::Default;
use strict;
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 /.+$}{};
chomp($s);
die <<EOT;
No valid domain source configured.

Return to:

Send suggestions and report system problems to the System administrator.