1 package CatalystX::Dynamic::ControllerIntrospection;
3 use MooseX::Types::Moose qw/ArrayRef/;
4 use namespace::autoclean;
6 # SYNOPSIS: Provide catalyst controller introspection as a model.
8 for my $name (qw/ classes roles /) {
10 has "limit_to_$name" => (
11 isa => ArrayRef, is => 'ro', default => sub { [] },
12 predicate => "_should_limit_to_$name",
17 sub list_controllers {
18 my ($self, $app) = @_;
19 my @controllers = grep { 1 } $app->controllers;
22 __PACKAGE__->meta->make_immutable;