Get rid of the insanity of passing the compoenent method as a subref - instead it...
[catagits/CatalystX-DynamicComponent.git] / lib / CatalystX / ModelToControllerReflector.pm
index 5f698a4..4364410 100644 (file)
@@ -30,16 +30,13 @@ sub _reflect_model_to_controller {
     my $suffix = $model_name;
     $suffix =~ s/^.*::Model:://;
 
-    my $controller = $app->_setup_dynamic_controller( $controller_name, {}, sub {
-        shift->next::method(@_); # Just use the default COMPONENT method
-    });
+    my $controller = $app->_setup_dynamic_controller( $controller_name, {} );
     my $meta = $controller->meta;
     $meta->make_mutable; # Dirty, I should build the class, add the methods, then
                          # last of all make it a component. The only reason it works
                          # like this is that I wrote the simple thing for the model
                          # code, abstracted _just_ enough to make it fly with this
                          # dirty hack, then stopped. EVERY TIME YOU DO THIS KITTENS DIE
-    $meta->remove_method('COMPONENT'); # OMFG This is fucking insane. FIXME!
     $meta->superclasses($app . '::ControllerBase'); # Wrong namespace, should be config
                                                     # and we force it to do a role to
                                                     # add our crap, allowing the user