blib/lib/WWW/Shopify/Liquid/Filter/Sum.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 16 | 16 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 7 | 7 | 100.0 |
pod | 0 | 3 | 0.0 |
total | 23 | 26 | 88.4 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | 37 | 37 | 18519 | use strict; | |||
37 | 115 | ||||||
37 | 1136 | ||||||
3 | 37 | 37 | 239 | use warnings; | |||
37 | 105 | ||||||
37 | 1483 | ||||||
4 | |||||||
5 | 37 | 37 | 250 | package WWW::Shopify::Liquid::Filter::Sum; use base 'WWW::Shopify::Liquid::Filter'; | |||
37 | 99 | ||||||
37 | 4987 | ||||||
6 | 85 | 85 | 0 | 698 | sub transparent { return 1; } | ||
7 | 2 | 2 | 0 | 7 | sub max_arguments { return 0; } | ||
8 | 37 | 37 | 293 | use List::Util qw(sum); | |||
37 | 99 | ||||||
37 | 3853 | ||||||
9 | sub operate { | ||||||
10 | 1 | 1 | 0 | 2 | return sum(@{$_[2]}); | ||
1 | 7 | ||||||
11 | } | ||||||
12 | |||||||
13 | 1; |