blib/lib/WWW/Shopify/Liquid/Filter/Reverse.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 2 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 25 CC 2 SCAR 12.0
CC
2
Cov
0%
operate
6.0
max_arguments
2.0
BEGIN
2.0
CRAP 3.3
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4  
5 package WWW::Shopify::Liquid::Filter::Reverse;
6 use base 'WWW::Shopify::Liquid::Filter';
7 sub max_arguments { return 0; }
8 sub operate {
9 my ($self, $hash, $operand) = @_;
10 return undef unless (ref($operand) || '') eq 'ARRAY';
11 return [reverse(@$operand)];
12 }
13  
14 1;