X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FApplication.pm;h=60542f987eefed9e5a4b058fc0cbe22026a7867c;hb=7c1eccbb6e4b547e61e82ece501c824785c25480;hp=a0e49bc5fbacf33164441c4ed5c08e769dbe8ec9;hpb=7f1d3cd72f5b45850f7faa380704bbb633c58f77;p=maypole.git diff --git a/lib/Maypole/Application.pm b/lib/Maypole/Application.pm index a0e49bc..60542f9 100644 --- a/lib/Maypole/Application.pm +++ b/lib/Maypole/Application.pm @@ -6,11 +6,11 @@ use UNIVERSAL::require; use Maypole; use Maypole::Config; -our @ISA; our $VERSION = '2.11'; sub import { - my ( $class, @plugins ) = @_; + shift; # not interested in this - we manipulate the caller's @ISA directly + my @plugins = @_; my $caller = caller(0); my $frontend = 'Apache::MVC' if $ENV{MOD_PERL}; @@ -26,8 +26,6 @@ sub import { $frontend ||= 'CGI::Maypole'; $frontend->require or die "Loading $frontend frontend failed: $@"; - # inheritance may already be set up in a multi-app mod_perl environment - push @ISA, $frontend unless __PACKAGE__->isa( $frontend ); my $autosetup=0; my $autoinit=0; @@ -57,7 +55,7 @@ sub import { } } no strict 'refs'; - push @{"${caller}::ISA"}, @plugin_modules, $class; + push @{"${caller}::ISA"}, @plugin_modules, $frontend; $caller->config(Maypole::Config->new); $caller->config->masonx({}) if $masonx; $caller->setup() if $autosetup;