File Coverage

blib/lib/WWW/Shopify/Liquid/Tag/Free.pm
Criterion Covered Total %
statement 21 21 100.0
branch 3 4 75.0
condition n/a
subroutine 8 8 100.0
pod 0 5 0.0
total 32 38 84.2


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 37     37   295 use strict;
  37         95  
  37         1410  
3 37     37   218 use warnings;
  37         90  
  37         1393  
4              
5             package WWW::Shopify::Liquid::Tag::Free;
6 37     37   228 use base 'WWW::Shopify::Liquid::Tag';
  37         101  
  37         11332  
7 862     862 0 3163 sub is_free { return 1; }
8 852 50   852 0 2611 sub abstract { my $package = ref($_[0]) ? ref($_[0]) : $_[0]; return ($package eq __PACKAGE__); }
  852         3326  
9 37     37 0 106 sub subelements { qw(arguments); }
10              
11             sub new {
12 161     161 0 592 my ($package, $line, $tag, $arguments) = @_;
13 161         706 my $self = { line => $line, core => $tag, arguments => $arguments };
14 161         593 return bless $self, $package;
15             }
16              
17             sub process {
18 890     890 0 2503 my ($self, $hash, $action, $pipeline) = @_;
19 890         3350 my $arguments = $self->process_subelement($hash, $action, $pipeline, $self->{arguments});
20 885 100       2454 return $self unless int(grep { !$self->is_processed($_) } @$arguments) == 0;
  885         2675  
21 820         4748 return $self->operate($hash, @$arguments);
22             }
23              
24             1;