From: Marcus Ramberg Date: Tue, 28 Jun 2005 11:27:48 +0000 (+0000) Subject: fix import inheritance bug. X-Git-Tag: 5.7099_04~1278 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=599b52952b28f527af103cdf9f134b09ccd522e3 fix import inheritance bug. --- diff --git a/Changes b/Changes index f1bf6c1..fd5be57 100644 --- 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. diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 4ee89df..7523068 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -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 ] );