- foreach (@plugins) {
- if (/^\-Setup$/) { $autosetup++; }
- elsif (/^\-Init$/) { $autoinit++ }
- elsif (/^\-Debug(\d*)$/) {
- my $d = $1 || 1;
- no strict 'refs';
- *{"$caller\::debug"} = sub { $d };
- warn "Debugging (level $d) enabled for $caller";
- }
- elsif (/^-.*$/) { warn "Unknown flag: $_" }
- else {
- my $plugin = "Maypole::Plugin::$_";
- if ($plugin->require) {
- push @plugin_modules, "Maypole::Plugin::$_";
- warn "Loaded plugin: $plugin for $caller"
- if $caller->can('debug') && $caller->debug;
- } else {
- die qq(Loading plugin "$plugin" for $caller failed: )
- . $UNIVERSAL::require::ERROR;
- }
+ if (/^\-Setup$/) { $autosetup++; }
+ elsif (/^\-Init$/) { $autoinit++ }
+ elsif (/^\-Debug(\d*)$/) {
+ my $d = $1 || 1;
+ no strict 'refs';
+ *{"$caller\::debug"} = sub { $d };
+ warn "Debugging (level $d) enabled for $caller";
+ }
+ elsif (/^-.*$/) { warn "Unknown flag: $_" }
+ else {
+ my $plugin = "Maypole::Plugin::$_";
+ if ($plugin->require) {
+ push @plugin_modules, "Maypole::Plugin::$_";
+ warn "Loaded plugin: $plugin for $caller"
+ if $caller->can('debug') && $caller->debug;
+ } else {
+ die qq(Loading plugin "$plugin" for $caller failed: )
+ . $UNIVERSAL::require::ERROR;