File Coverage

blib/lib/WWW/Shopify/Liquid/Operator/Not.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod 0 4 0.0
total 25 29 86.2


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3 37     37   442066 use strict;
  37         128  
  37         1530  
4 37     37   256 use warnings;
  37         105  
  37         2780  
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 37     37   279 use base 'WWW::Shopify::Liquid::Operator';
  37         98  
  37         14414  
10 37     37   305 use Scalar::Util qw(blessed);
  37         101  
  37         4497  
11 1318     1318 0 4986 sub symbol { return "!"; }
12 344     344 0 2090 sub arity { return "unary"; }
13 344     344 0 2054 sub fixness { return "prefix"; }
14             sub operate {
15 4     4 0 18 my ($self, $hash, $action, $op) = @_;
16 4         27 return !$op;
17             }
18              
19             1;