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

filter: Statementstmt 58.8% 10 / 17 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 3 totaltotal 37.1% 13 / 35 CC 4 SCAR 22.7
CC
4
Cov
42%
operate
20.0
symbol
2.0
priority
2.0
CRAP 9.7
« blib/lib/WWW/Shopify/Liquid/Filter/DateMath.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/Date.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::Regex;
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=4 SCAR=30.0
Pod undocumented
12 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
13 0 my @groups = ($op1 =~ m/$op2/);
14 0 ▶ return undef if (int(@groups) == 0);
Branch: 1 branch
BranchTrueFalseTotal
if int @groups == 0 0 0 0
15 0 return \@groups;
16 }
17  
18 30 1;
« blib/lib/WWW/Shopify/Liquid/Filter/DateMath.pm ↑ Summary blib/lib/WWW/Shopify/Liquid/Filter/Date.pm »