From: Sebastian Riedel Date: Tue, 22 Mar 2005 02:31:43 +0000 (+0000) Subject: fixed inheritance X-Git-Tag: 5.7099_04~1743 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=1c99e1250cfd5cdefb5f36bd08b974c9384412e5 fixed inheritance --- diff --git a/Changes b/Changes index 0d26476..c22d711 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ This file documents the revision history for Perl extension Catalyst. -4.30 XXX XXX XX XX:00:00 2005 +4.31 XXX XXX XX XX:00:00 2005 + - fixed inheritance (Christian Hansen) + +4.30 Mon Mar 22 23:00:00 2005 - more documentation (Andrew Ford) - added connection informations (Christian Hansen) - HTTP::Request support in Catalyst::Test (Christian Hansen) 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" }