Fix duplicate results from get_action_methods. Q. Why didn't I just do that first...
Tomas Doran [Mon, 7 Sep 2009 20:33:31 +0000 (20:33 +0000)]
Changes
lib/Catalyst/Controller.pm

diff --git a/Changes b/Changes
index b91a97f..c268650 100644 (file)
--- a/Changes
+++ b/Changes
@@ -5,6 +5,10 @@
      - Fix t/optional_http-server-restart.t test.
      - Fix duplicate components being loaded at setup time, each component is
        now loaded at most once + tests.
+     - Fix backward compatibility - hash key configured actions are stored in
+       is returned to 'actions'.
+     - Fix get_action_methods returning duplicate methods when a method is both
+       decorated with method attributes and set as an action in config.
 
   Refactoring / cleanups:
      - Reduce minimum supported perl version from 5.8.6 to 5.8.4 as there are
index cb01c11..dc68a33 100644 (file)
@@ -2,7 +2,7 @@ package Catalyst::Controller;
 
 use Moose;
 use Moose::Util qw/find_meta/;
-
+use List::MoreUtils qw/uniq/;
 use namespace::clean -except => 'meta';
 
 BEGIN { extends qw/Catalyst::Component MooseX::MethodAttributes::Inheritable/; }
@@ -200,7 +200,7 @@ sub get_action_methods {
                   . ( ref $self ) )
           } keys %{ $self->_controller_actions }
     ) if ( ref $self );
-    return @methods;
+    return uniq @methods;
 }