File Coverage

blib/lib/WWW/Shopify/Liquid/Filter/MD5.pm
Criterion Covered Total %
statement 15 18 83.3
branch 0 2 0.0
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 27 74.0


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 21     21   13501 use strict;
  21         39  
  21         740  
3 21     21   101 use warnings;
  21         34  
  21         708  
4              
5 21     21   99 package WWW::Shopify::Liquid::Filter::MD5; use base 'WWW::Shopify::Liquid::Filter';
  21         35  
  21         1504  
6 21     21   114 use Digest::MD5 qw(md5_hex);
  21         34  
  21         1186  
7 21     21   109 use JSON qw(to_json);
  21         36  
  21         178  
8             sub operate {
9 0     0 0   my ($self, $hash, $operand, @arguments) = @_;
10 0 0         return md5_hex(to_json($operand, { canonical => 1 })) if ref($operand);
11 0           return md5_hex($operand);
12             }
13              
14             1;