Get rid of all messing with action registration by just stuffing the attributes onto...
[catagits/CatalystX-DynamicComponent.git] / lib / CatalystX / ModelToControllerReflector / ControllerRole.pm
index 4287bb0..44a70fa 100644 (file)
@@ -3,37 +3,5 @@ use Moose::Role;
 use Moose::Util qw/find_meta/;
 use namespace::autoclean;
 
-sub get_reflected_action_methods {
-    my ($self) = @_;
-    my $meta = find_meta($self);
-
-    map { $self->_smash_method_attributes($_) }
-            grep { ! /^(_.*|new|meta|get_(reflected_)?action_methods)$/ }
-                                        # FIXME - giant turd, right there.
-            $meta->get_method_list;    # we need to apply a role to the
-                                       # metaclass of each method we generate,
-                                       # and then test for that role being done
-                                       # by the method in question here.
-                                        # Should probably also check they supports
-                                        # attributes and shit self if not.
-}
-
-# EPIC CHEAT to just smash the attribute definition :)
-sub _smash_method_attributes {
-    my ($self, $name) = @_;
-    my $meta = find_meta($self);
-
-    my $m = $meta->get_method($name);
-    $m->meta->get_attribute('attributes')->set_value($m, ['Local']);
-    return $m;
-}
-
-around get_action_methods => sub {
-    my $orig = shift;
-    my $self = shift;
-
-    return ($self->get_reflected_action_methods, $self->$orig(@_));
-};
-
 1;