File Coverage

blib/lib/WWW/Shopify/Liquid/Operator/Minus.pm
Criterion Covered Total %
statement 9 14 64.2
branch 0 4 0.0
condition 0 12 0.0
subroutine 3 6 50.0
pod 0 3 0.0
total 12 39 30.7


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2 30     30   16296 use strict;
  30         60  
  30         889  
3 30     30   129 use warnings;
  30         45  
  30         1133  
4              
5             package WWW::Shopify::Liquid::Operator::Minus;
6 30     30   128 use base 'WWW::Shopify::Liquid::Operator';
  30         41  
  30         6038  
7 0     0 0   sub symbol { return '-'; }
8 0     0 0   sub priority { return 9; }
9             sub operate {
10 0 0 0 0 0   $_[3] = $_[3]->epoch if ($_[3] && ref($_[3]) && ref($_[3]) eq 'DateTime');
      0        
11 0 0 0       $_[4] = $_[4]->epoch if ($_[4] && ref($_[4]) && ref($_[4]) eq 'DateTime');
      0        
12            
13 0           return $_[0]->ensure_numerical($_[3]) - $_[0]->ensure_numerical($_[4]); }
14              
15             1;