]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Application.pm
skip uppercase methods.
[maypole.git] / lib / Maypole / Application.pm
index c2d58dc8bae21fc74a9f81cda564ec850251cfb9..b6789a835c229cf3db7f501ff5626570532d3bf9 100644 (file)
@@ -3,13 +3,24 @@ package Maypole::Application;
 use strict;
 use warnings;
 
+our @ISA;
+
+sub import {
+    my ( $self, @plugins ) = @_;
+     return unless $plugins[0];
+     my $caller=caller(0);
+     no strict 'refs';
+     push @{"${caller}::ISA"}, $self;    
+     "Maypole::$_"->require && unshift @ISA, "Maypole::$_" foreach (@plugins);
+}
+
 if ( $ENV{MOD_PERL} ) {
     require Apache::MVC;
-    our @ISA = qw(Apache::MVC);
+    push @ISA , qw(Apache::MVC);
 }
 else {
     require CGI::Maypole;
-    our @ISA = qw(CGI::Maypole);
+    push @ISA , qw(CGI::Maypole);
 }
 
 1;