File Coverage

blib/lib/WWW/Shopify/Liquid/Dialect/Shopify/Filter/LinkToType.pm
Criterion Covered Total %
statement 9 10 90.0
branch 0 2 0.0
condition n/a
subroutine 3 4 75.0
pod 0 1 0.0
total 12 17 70.5


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 1     1   478 use strict;
  1         3  
  1         35  
3 1     1   7 use warnings;
  1         4  
  1         46  
4              
5 1     1   8 package WWW::Shopify::Liquid::Dialect::Shopify::Filter::LinkToType; use base 'WWW::Shopify::Liquid::Filter';
  1         3  
  1         201  
6 0 0   0 0   sub operate { return $_[1]->{product} ? "<a href='/collections/types?q=" . uri_escape($_[1]->{product}->{type}) . "'>" . $_[3] . "</a>" : $_[3]; }
7              
8             1;