]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Application.pm
tidied up inheritance in Mp::App - bugs 12923 & 14120
[maypole.git] / lib / Maypole / Application.pm
index a0e49bc5fbacf33164441c4ed5c08e769dbe8ec9..60542f987eefed9e5a4b058fc0cbe22026a7867c 100644 (file)
@@ -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;