« blib/lib/auto/share/module/Dist-Zilla-MintingProfile-FB11/Controller/Controller.pm
↑ Summary
blib/lib/auto/share/module/Dist-Zilla-MintingProfile-FB11/FB11X/skel/t/lib/TestApp.pm »
| 1 | package {{ $name }}; | ||
| 2 | |||
| 3 | use Moose::Role; | ||
| 4 | use CatalystX::InjectComponent; | ||
| 5 | use namespace::autoclean; | ||
| 6 | |||
| 7 | with 'OpusVL::FB11::RolesFor::Plugin'; | ||
| 8 | |||
| 9 | # ABSTRACT: A brand new FB11 plugin! | ||
| 10 | our $VERSION = '0'; | ||
| 11 | {{ | ||
| 12 | ($controller) = ($name =~ /::([^:]+)$/); '' | ||
| 13 | }} | ||
| 14 | |||
| 15 | after 'setup_components' => sub { | ||
| 16 | my $class = shift; | ||
| 17 | |||
| 18 | $class->add_paths(__PACKAGE__); | ||
| 19 | |||
| 20 | # .. inject your components here .. | ||
| 21 | CatalystX::InjectComponent->inject( | ||
| 22 | into => $class, | ||
| 23 | component => '{{ $name }}::Controller::{{ $controller }}', | ||
| 24 | as => 'Controller::{{ $controller }}' | ||
| 25 | ); | ||
| 26 | }; | ||
| 27 | |||
| 28 | 1; |