DynamicComponent/ModelToControllerReflector/Strategy/InterfaceRoles.pm untested

filter: Statementstmt 0.0% 0 / 25 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 43 CC 4 SCAR 23.0
CC
4
Cov
0%
get_reflected_method_list
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 10.0
1 package CatalystX::DynamicComponent::ModelToControllerReflector::Strategy::InterfaceRoles;
2 use Moose;
3 use MooseX::Types::Moose qw/HashRef/;
4 use Moose::Autobox;
5 use List::MoreUtils qw/uniq/;
6 use namespace::autoclean;
7  
8 with 'CatalystX::DynamicComponent::ModelToControllerReflector::Strategy';
9  
10 sub get_reflected_method_list {;
11 my ($self, $app, $model_name) = @_;
12 my $model_config = exists $app->config->{$model_name} ? $app->config->{$model_name} : {};
13 my $my_config = exists $app->config->{'CatalystX::DynamicComponent::ModelToControllerReflector'}
14 ? $app->config->{'CatalystX::DynamicComponent::ModelToControllerReflector'} : {};
15 my $interface_roles = [ uniq( map { (defined $_ && exists $_->{interface_roles}) ? $_->{interface_roles}->flatten : () } $model_config, $my_config ) ];
16  
17 map { $_->meta->get_required_method_list } @$interface_roles;
18 }
19  
20 __PACKAGE__->meta->make_immutable;
21