X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=a412efae15f2220bfe395f5b74167fa2d70baafb;hb=38cb5be33d7e884a6bc604f7e55ffa7a436475d1;hp=b3abcafcafc0f795c9b4a7126caac722eeef5d22;hpb=aa6d250314e92cb95095d771defbbf0cada411e7;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index b3abcaf..a412efa 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -125,20 +125,21 @@ Returns a hashref containing your applications settings. sub import { my ( $class, @arguments ) = @_; + my $caller = caller(0); + + if ( $caller eq 'main' ) { + return; + } # Prepare inheritance unless ( $caller->isa($class) ) { no strict 'refs'; push @{"$caller\::ISA"}, $class; } - + if ( $caller->engine ) { - - unless ( $caller eq 'main' ) { - $caller->log->warn( qq/Attempt to re-initialize "$caller"/ ); - } - + $caller->log->warn( qq/Attempt to re-initialize "$caller"/ ); return; }