File Coverage

blib/lib/WWW/Shopify/Liquid/Operator/Not.pm
Criterion Covered Total %
statement 12 17 70.5
branch n/a
condition n/a
subroutine 4 8 50.0
pod 0 4 0.0
total 16 29 55.1


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3 30     30   23849 use strict;
  30         48  
  30         1018  
4 30     30   164 use warnings;
  30         37  
  30         1082  
5              
6             # Used in our AST to keep things simple; represents the concatenation of text and other stuff.
7             # Making this a many-dimensional operator, so that we avoid going too far down the callstack rabbithole.
8             package WWW::Shopify::Liquid::Operator::Not;
9 30     30   162 use base 'WWW::Shopify::Liquid::Operator';
  30         38  
  30         2223  
10 30     30   142 use Scalar::Util qw(blessed);
  30         51  
  30         3806  
11 0     0 0   sub symbol { return "!"; }
12 0     0 0   sub arity { return "unary"; }
13 0     0 0   sub fixness { return "prefix"; }
14             sub operate {
15 0     0 0   my ($self, $hash, $action, $op) = @_;
16 0           return !$op;
17             }
18              
19             1;