File Coverage

blib/lib/WWW/Shopify/Liquid/Tag/Enclosing.pm
Criterion Covered Total %
statement 9 24 37.5
branch 0 8 0.0
condition n/a
subroutine 3 11 27.2
pod 0 8 0.0
total 12 51 23.5


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 30     30   180 use strict;
  30         51  
  30         880  
3 30     30   119 use warnings;
  30         44  
  30         1086  
4              
5             package WWW::Shopify::Liquid::Tag::Enclosing;
6 30     30   143 use base 'WWW::Shopify::Liquid::Tag';
  30         42  
  30         13599  
7 0 0   0 0   sub abstract { my $package = ref($_[0]) ? ref($_[0]) : $_[0]; return ($package eq __PACKAGE__); }
  0            
8 0     0 0   sub is_enclosing { return 1; }
9 0     0 0   sub inner_tags { return (); }
10 0     0 0   sub inner_ignore_whitespace { return 0; }
11             # Interprets the inner of this tag as being completely text. Used for comments and raws.
12 0     0 0   sub inner_halt_lexing { return 0; }
13              
14             sub new {
15 0     0 0   my ($package, $line, $tag, $arguments, $contents) = @_;
16 0           my $self = { line => $line, core => $tag, arguments => $arguments, contents => @{$contents->[0]} };
  0            
17 0 0         die new WWW::Shopify::Liquid::Exception::Parser($self, "Uncustomized tags can only have one element following their contents.") unless int(@$contents) == 1;
18 0           return bless $self, $package;
19             }
20              
21 0 0   0 0   sub strip_left_end { $_[0]->{strip_left_end} = $_[1] if @_ > 1; return $_[0]->{strip_left_end}; }
  0            
22 0 0   0 0   sub strip_right_end { $_[0]->{strip_right_end} = $_[1] if @_ > 1; return $_[0]->{strip_right_end}; }
  0            
23              
24             1;