fixed inheritance
Sebastian Riedel [Tue, 22 Mar 2005 02:31:43 +0000 (02:31 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index 0d26476..c22d711 100644 (file)
--- 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)
index 3182f94..c55563f 100644 (file)
@@ -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" }