use strict;
use warnings;
use UNIVERSAL::require;
+use Maypole;
our @ISA;
my $caller = caller(0);
no strict 'refs';
push @{"${caller}::ISA"}, $self;
- foreach (@plugins) {
- if (/^\-Setup$/) { $caller->setup }
+ my $autosetup=0;
+ foreach (sort @plugins) {
+ if (/^\-Setup$/) { $autosetup++; }
elsif (/^\-Debug$/) {
*{"$caller\::debug"} = sub { 1 };
warn "Debugging enabled";
}
+ elsif (/^-.*$/) { warn "Unknown flag: $_" }
else {
-
# The plugin caller should be our application class
eval "package $caller; require Maypole::Plugin::$_";
if ($@) { warn qq(Loading plugin "Maypole::Plugin::$_" failed: $@) }
}
}
}
+ $caller->setup() if $autosetup;
}
if ( $ENV{MOD_PERL} ) {
use Maypole::Application;
+ use Maypole::Application qw(Config::YAML);
+
+ use Maypole::Application qw(-Debug Config::YAML -Setup);
+
+ use Maypole::Application qw(Config::YAML Loader -Setup -Debug);
+
=head1 DESCRIPTION
This is a universal frontend for mod_perl1, mod_perl2 and CGI.