From 9f9564bdb882d38a35d164336cb8f0d0da7eb251 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Fri, 3 Jan 2020 11:58:49 +0100 Subject: Minor changes * lib/App/Acmeman/Apache/Layout.pm: Add debugging * lib/App/Acmeman/Apache/Layout/debian.pm (post_setup): Enable mod_macro --- lib/App/Acmeman/Apache/Layout.pm | 19 ++++++++++++------- lib/App/Acmeman/Apache/Layout/debian.pm | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/App/Acmeman/Apache/Layout.pm b/lib/App/Acmeman/Apache/Layout.pm index 39e40d5..7b9ec9d 100644 --- a/lib/App/Acmeman/Apache/Layout.pm +++ b/lib/App/Acmeman/Apache/Layout.pm @@ -30,11 +30,12 @@ sub modules { eval { no strict 'refs'; if (scalar %{ $modname.'::' }) { - die "INCLUDED $modname"; - }; - require $_; - my $prio = ${$modname.'::PRIORITY'} // 0; - [ $prio, $modname ] + () + } else { + require $_; + my $prio = ${$modname.'::PRIORITY'} // 0; + [ $prio, $modname ] + } }; } map { glob File::Spec->catfile($_, '*.pm') } @@ -49,7 +50,8 @@ sub new { my $class = shift; if (@_ == 0) { - # Autodetect + # Autodetect + debug(3, "detecting Apache configuration layout"); my $ap = new Apache::Defaults(server => $class->_find_httpd, on_error => 'return'); if ($ap->status) { @@ -57,6 +59,7 @@ sub new { } foreach my $mod ($class->modules) { + debug(3, "trying layout module $mod"); my $obj; eval { $obj = $mod->new($ap); @@ -64,7 +67,9 @@ sub new { if ($obj) { return $obj; } -# print "A $mod: $@\n"; + if ($@) { + debug(3, "layout module failed: $@"); + } } if ($ap) { diff --git a/lib/App/Acmeman/Apache/Layout/debian.pm b/lib/App/Acmeman/Apache/Layout/debian.pm index 663883e..f123892 100644 --- a/lib/App/Acmeman/Apache/Layout/debian.pm +++ b/lib/App/Acmeman/Apache/Layout/debian.pm @@ -34,6 +34,7 @@ sub post_setup { if ($dir eq '/etc/apache2/conf-available') { chdir('/etc/apache2/conf-enabled'); symlink "../conf-available/$name", $name; + system("a2enmod macro"); } } -- cgit v1.2.1