blib/lib/WWW/Shopify/Liquid/Tag/Free.pm untested

filter: Statementstmt 0.0% 0 / 21 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 8 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 38 CC 3 SCAR 12.8
CC
3
Cov
0%
abstract
6.0
process
6.0
is_free
2.0
CRAP 3.6
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4  
5 package WWW::Shopify::Liquid::Tag::Free;
6 use base 'WWW::Shopify::Liquid::Tag';
7 sub is_free { return 1; }
8 sub abstract { my $package = ref($_[0]) ? ref($_[0]) : $_[0]; return ($package eq __PACKAGE__); }
9 sub subelements { qw(arguments); }
10  
11 sub new {
12 my ($package, $line, $tag, $arguments) = @_;
13 my $self = { line => $line, core => $tag, arguments => $arguments };
14 return bless $self, $package;
15 }
16  
17 sub process {
18 my ($self, $hash, $action, $pipeline) = @_;
19 my $arguments = $self->process_subelement($hash, $action, $pipeline, $self->{arguments});
20 return $self unless int(grep { !$self->is_processed($_) } @$arguments) == 0;
21 return $self->operate($hash, @$arguments);
22 }
23  
24 1;