fix import inheritance bug.
Marcus Ramberg [Tue, 28 Jun 2005 11:27:48 +0000 (11:27 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index f1bf6c1..fd5be57 100644 (file)
--- a/Changes
+++ b/Changes
@@ -2,6 +2,7 @@ This file documents the revision history for Perl extension Catalyst.
 
 5.30  2005-00-00 00:00:00
 
+        - Fix for inheritance bug.
         - Allow forward with arguments.
         - Updated cookbook
         - Allow overriding home/root in config.
index 4ee89df..7523068 100644 (file)
@@ -127,6 +127,8 @@ Returns a hashref containing your applications settings.
 sub import {
     my ( $class, @arguments ) = @_;
 
+    return unless $class eq 'Catalyst';
+
     my $caller = caller(0);
     
     # Prepare inheritance
@@ -135,7 +137,6 @@ sub import {
         no strict 'refs';
         push @{"$caller\::ISA"}, $class;
         
-        *{"$caller\::import"} = sub { 1 };
     }
 
     $caller->arguments( [ @arguments ] );