| 1 | #!/usr/bin/perl | ||||||||||||||||||||||||||||||||||||||||||
| 2 | 38 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 3 | 38 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||||||||||||||||
| 5 | 38 | ▶ | use WWW::Shopify::Liquid::Tag; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||||||||||||
| 7 | package WWW::Shopify::Liquid::Tag::Paginate; | ||||||||||||||||||||||||||||||||||||||||||
| 8 | 38 | ▶ | use base 'WWW::Shopify::Liquid::Tag::Enclosing'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | 0 | ▶ | sub process { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
process: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 11 | 0 | my ($self, $hash, $action, $pipeline) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 12 | 0 | ▶ | return '' unless int(@{$self->{arguments}}) > 0; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | my $result = $self->{arguments}->[0]->$action($pipeline, $hash); | |||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | my ($string, $argument); | |||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | if ($result && ref($result) && $result->isa('WWW::Shopify::Liquid::Operator::By')) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$result and ref $result and $result->isa("WWW::Shopify::Liquid::Operator::By")
$result and ref $result
MC/DC0%0/3
$result and ref $result and $result->isa("WWW::Shopify::Liquid::Operator::By")
$result
ref $result
$result->isa("WWW::Shopify::Liquid::Operator::By")
Truth table0%0/4
A and B and C
A= $resultB= ref $resultC= $result->isa("WWW::Shopify::Liquid::Operator::By")
| |||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | my $reference = $pipeline->variable_reference($hash, $result->{operands}->[0], 1); | |||||||||||||||||||||||||||||||||||||||||
| 17 | 0 | my $amount = $result->{operands}->[1]->$action($pipeline, $hash); | |||||||||||||||||||||||||||||||||||||||||
| 18 | 0 | $$reference = $self->paginate($hash, $reference, $amount); | |||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | my $result = $self->{contents}->$action($pipeline, $hash); | |||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | return $result; | |||||||||||||||||||||||||||||||||||||||||
| 21 | } else { | ||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||||||||||||||||
| 24 | } | ||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | ▶ | sub paginate { | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
paginate: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | my ($self, $hash, $variable_reference, $amount) = @_; | |||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | return $self; | |||||||||||||||||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||
| 31 | 38 | 1; | |||||||||||||||||||||||||||||||||||||||||