blib/lib/WWW/Shopify/Liquid/Operator/NotRegex.pm

filter: Statementstmt 55.5% 10 / 18 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 30.2% 13 / 43 CC 6 SCAR 31.6
CC
6
Cov
33%
operate
42.0
symbol
2.0
priority
2.0
CRAP 23.5
« blib/lib/WWW/Shopify/Liquid/Operator/Minus.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Tag.pm »
1 #!/usr/bin/perl
2 30 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 30 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 # So sick of crap.
6 package WWW::Shopify::Liquid::Operator::NotRegex;
7 30 ▶use base 'WWW::Shopify::Liquid::Operator';
Subroutine BEGIN: called CC=1 SCAR=0.0
8 0 ▶sub symbol { return '!~'; }
Subroutine symbol: not called CC=1 SCAR=6.9
Pod undocumented
9 0 ▶sub priority { return 5; }
Subroutine priority: not called CC=1 SCAR=6.9
Pod undocumented
10 sub operate {
11 0 ▶ my ($self, $hash, $action, $op1, $op2) = @_;
Subroutine operate: not called CC=6 SCAR=37.4
Pod undocumented
12 0 ▶ return 1 if !defined $op1 && defined $op2;
Branch: 1 branch
BranchTrueFalseTotal
if not defined $op1 and defined $op2 0 0 0
Condition0%0/3
not defined $op1 and defined $op2
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $op1 and defined $op2
not defined $op1 defined $op2
Truth table0%0/3
not(A) and B
A= not defined $op1B= defined $op2
ABresult
0X0
100
111
13 0 ▶ return undef unless defined $op1 && defined $op2;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $op1 and defined $op2 0 0 0
Condition0%0/3
defined $op1 and defined $op2
!ll&&!rl&&r
000
MC/DC0%0/2
defined $op1 and defined $op2
defined $op1 defined $op2
Truth table0%0/3
A and B
A= defined $op1B= defined $op2
ABresult
0X0
100
111
14 0 my @groups = ($op1 !~ m/$op2/);
15 0 ▶ return undef if (int(@groups) == 0);
Branch: 1 branch
BranchTrueFalseTotal
if int @groups == 0 0 0 0
16 0 return \@groups;
17 }
18  
19 30 1;
« blib/lib/WWW/Shopify/Liquid/Operator/Minus.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Tag.pm »