ZofCMS/Plugin/FormFiller.pm

filter: Statementstmt 34.7% 8 / 23 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 13 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 17.5% 10 / 57 CC 10 SCAR 44.4
CC
10
Cov
18%
process
110.0
new
2.0
BEGIN
1.0
CRAP 84.9
« ZofCMS/Plugin/Debug/Dumper.pm ↑ Summary ZofCMS/Plugin/BreadCrumbs.pm »
1 package App::ZofCMS::Plugin::FormFiller;
2  
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 our $VERSION = '1.001010'; # VERSION
7  
8 0 ▶sub new { bless {}, shift }
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
9  
10 0 ▶sub process {
Subroutine process: not called CC=10 SCAR=47.0
Pod undocumented
11 0 my ( $self, $template, $query, $config ) = @_;
12  
13 return
14 unless $template->{plug_form_filler}
15 0 ▶ or $config->conf->{plug_form_filler};
Branch: 1 branch
BranchTrueFalseTotal
unless $template->{"plug_form_filler"} or $config->conf->{"plug_form_filler"} 0 0 0
Condition0%0/3
$template->{"plug_form_filler"} or $config->conf->{"plug_form_filler"}
l!l&&r!l&&!r
000
MC/DC0%0/2
$template->{"plug_form_filler"} or $config->conf->{"plug_form_filler"}
$template->{"plug_form_filler"} $config->conf->{"plug_form_filler"}
Truth table0%0/3
A or B
A= $template->{"plug_form_filler"}B= $config->conf->{"plug_form_filler"}
ABresult
1X1
011
000
16  
17 my %conf = (
18 0 ▶ %{ delete $config->conf->{plug_form_filler} || {} },
Condition0%0/2
delete $config->conf->{'plug_form_filler'} || {}
l!l
00
MC/DC0%0/1
delete $config->conf->{'plug_form_filler'} || {}
delete $config->conf->{'plug_form_filler'}
Truth table0%0/2
A
A= delete $config->conf->{'plug_form_filler'}
Aresult
11
00
19 0 ▶ %{ delete $template->{plug_form_filler} || {} },
Condition0%0/2
delete $template->{'plug_form_filler'} || {}
l!l
00
MC/DC0%0/1
delete $template->{'plug_form_filler'} || {}
delete $template->{'plug_form_filler'}
Truth table0%0/2
A
A= delete $template->{'plug_form_filler'}
Aresult
11
00
20 );
21  
22 0 ▶ if ( ref $conf{params} eq 'ARRAY' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $conf{"params"} eq "ARRAY") 0 0 0
23 $conf{params} = {
24 0 map +( $_ => $_ ), @{ $conf{params} }
25 };
26 }
27  
28 0 keys %{ $conf{params} };
29 0 ▶ while ( my ( $t, $q ) = each %{ $conf{params} } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$conf{"params"};}) 0 0 0
30 next
31 unless defined $query->{$q}
32 and length $query->{$q}
33 0 ▶ and $query->{$q} ne $template->{t}{$t};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $query->{$q} and length $query->{$q} and $query->{$q} ne $template->{"t"}{$t} 0 0 0
Condition0%0/6
defined $query->{$q} and length $query->{$q} and $query->{$q} ne $template->{"t"}{$t}
!ll&&!rl&&r
000
defined $query->{$q} and length $query->{$q}
!ll&&!rl&&r
000
MC/DC0%0/3
defined $query->{$q} and length $query->{$q} and $query->{$q} ne $template->{"t"}{$t}
defined $query->{$q} length $query->{$q} $query->{$q} ne $template->{"t"}{$t}
Truth table0%0/4
A and B and C
A= defined $query->{$q}B= length $query->{$q}C= $query->{$q} ne $template->{"t"}{$t}
ABCresult
0XX0
10X0
1100
1111
34  
35 0 $template->{t}{$t} = $query->{$q};
36 }
37 }
38  
39 1 1;
40 __END__
« ZofCMS/Plugin/Debug/Dumper.pm ↑ Summary ZofCMS/Plugin/BreadCrumbs.pm »