File Coverage

blib/lib/WWW/Shopify/Liquid/Dialect/Web/Filter/LinkTo.pm
Criterion Covered Total %
statement 9 15 60.0
branch 0 4 0.0
condition n/a
subroutine 3 6 50.0
pod 0 3 0.0
total 12 28 42.8


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 1     1   461 use strict;
  1         3  
  1         35  
3 1     1   8 use warnings;
  1         3  
  1         49  
4              
5 1     1   8 package WWW::Shopify::Liquid::Dialect::Web::Filter::LinkTo; use base 'WWW::Shopify::Liquid::Filter';
  1         3  
  1         252  
6              
7 0     0 0   sub min_arguments { return 1; }
8 0     0 0   sub max_arguments { return 1; }
9              
10             sub operate {
11 0     0 0   my ($self, $hash, $operand, $link) = @_;
12 0 0         $operand = '' unless defined $operand;
13 0 0         $link = '' unless defined $link;
14 0           return "<a href='" . $link . "'>" . $operand . "</a>";
15             }
16              
17             1;