X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=c55563f7a0816a936f96dd0b60b46f9f36155c0c;hb=1c99e1250cfd5cdefb5f36bd08b974c9384412e5;hp=3182f9489df717954e3ac92551aa5b51813f55ff;hpb=0556eb49954590b794221ed3a033565c85dbeb32;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 3182f94..c55563f 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -7,7 +7,7 @@ use Catalyst::Log; __PACKAGE__->mk_classdata($_) for qw/_config log/; -our $VERSION = '4.30'; +our $VERSION = '4.31'; our @ISA; =head1 NAME @@ -146,9 +146,15 @@ sub import { no strict 'refs'; *{"$caller\::handler"} = sub { Catalyst::Engine::handler( $caller, @_ ) }; - push @{"$caller\::ISA"}, $self; + + unless ( $caller->isa($self) ) { + push @{"$caller\::ISA"}, $self; + } + } + + unless ( $self->log ) { + $self->log( Catalyst::Log->new ); } - $self->log( Catalyst::Log->new ); # Options my $engine = @@ -157,7 +163,7 @@ sub import { if (/^\-Debug$/) { no warnings; no strict 'refs'; - *{"$self\::debug"} = sub { 1 }; + *{"$caller\::debug"} = sub { 1 }; $caller->log->debug('Debug messages enabled'); } elsif (/^-Engine=(.*)$/) { $engine = "Catalyst::Engine::$1" }