Thats action registration sorted out. Now I just need to introspect all the models...
[catagits/CatalystX-DynamicComponent.git] / lib / DynamicAppDemo / Controller / FakeExample.pm
1 package DynamicAppDemo::Controller::FakeExample;
2 use Moose;
3 use namespace::clean -except => 'meta'; # N.B. namespace clean cest tres important
4                                         #      as this package is introspected, a lot!
5
6 BEGIN { extends 'DynamicAppDemo::ControllerBase' }
7
8 # This is a fake controller.
9
10 # It exists to show an example of using ::ControllerBase which is autogenerated,
11 # which helps me seperate the building and testing of the controller action
12 # registration functionality, seperate the the code generation :)
13
14 sub register_me { 
15     my ($self, $c) = @_;
16     $c->res->body('quux');
17     $c->res->header('X-Foo', 'bar');
18 }
19
20 sub _do_not_register_me { }
21
22 # In a non-trivial example, you would use MX::Method::Sigs :)
23
24 __PACKAGE__->meta->make_immutable;
25