FormValidator/Factory/Extensions.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 1 totaltotal 97.2% 35 / 36 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« FormValidator/Role/Profile.pm ↑ Summary FormValidator/Result.pm »
1 package Dancer2::Plugin::FormValidator::Factory::Extensions;
2  
3 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 10 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 10 ▶use Module::Load qw(autoload);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 10 ▶use Types::Standard qw(InstanceOf HashRef);
Subroutine BEGIN: called CC=1 SCAR=0.0
9 10 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 10 has plugin => (
12 is => 'ro',
13 isa => InstanceOf['Dancer2::Plugin::FormValidator'],
14 );
15  
16 10 has extensions => (
17 is => 'ro',
18 isa => HashRef,
19 );
20  
21 sub build {
22 10 ▶ my ($self) = @_;
Subroutine build: called CC=1 SCAR=0.0
Pod undocumented
23  
24 my @extensions = map {
25 1 my $extension = $self->extensions->{$_}->{provider};
26 1 autoload $extension;
27  
28 $extension->new(
29 plugin => $self->plugin,
30 1 config => $self->extensions->{$_},
31 );
32 10 } keys %{ $self->extensions };
33  
34 10 return \@extensions;
35 }
36  
37 10 1;
« FormValidator/Role/Profile.pm ↑ Summary FormValidator/Result.pm »