This can't work and won't work until generated components do a role. I need that...
[catagits/CatalystX-DynamicComponent.git] / lib / CatalystX / DynamicControllerIntrospection.pm
1 package CatalystX::Dynamic::ControllerIntrospection;
2 use Moose;
3 use MooseX::Types::Moose qw/ArrayRef/;
4 use namespace::autoclean;
5
6 # SYNOPSIS: Provide catalyst controller introspection as a model.
7
8 for my $name (qw/ classes roles /) {
9
10     has "limit_to_$name" => ( 
11         isa => ArrayRef, is => 'ro', default => sub { [] }, 
12         predicate => "_should_limit_to_$name",
13     );
14
15 }
16
17 sub list_controllers {
18     my ($self, $app) = @_;
19     my @controllers = grep { 1 } $app->controllers;
20 }
21
22 __PACKAGE__->meta->make_immutable;
23