From: Sebastian Riedel Date: Thu, 31 Mar 2005 14:59:44 +0000 (+0000) Subject: fixed multiple action problem X-Git-Tag: 5.7099_04~1642 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=bb6823f2c81daa8569c6e7a72c26640a792ec0dc;hp=cda8d1ac93da3a50d217e4e4ad5aa96d8d1ab1b2 fixed multiple action problem --- diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 876c822..c092d50 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -738,17 +738,16 @@ sub setup_actions { my $name = ''; no strict 'refs'; my @cache = ( $comp, @{"$comp\::ISA"} ); - my @namespaces; - my %seen; + my %namespaces; while ( my $namespace = shift @cache ) { - push @namespaces, $namespace; + $namespaces{$namespace}++; for my $isa ( @{"$comp\::ISA"} ) { - next if $seen{$isa}; + next if $namespaces{$isa}; push @cache, $isa; - $seen{$isa}++; + $namespaces{$isa}++; } } - for my $namespace (@namespaces) { + for my $namespace ( keys %namespaces ) { for my $sym ( values %{ $namespace . '::' } ) { if ( *{$sym}{CODE} && *{$sym}{CODE} == $code ) { $name = *{$sym}{NAME};