blib/lib/WWW/Shopify/Liquid/Operator/Modulo.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 12 | 75.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 6 | 50.0 |
pod | 0 | 3 | 0.0 |
total | 12 | 21 | 57.1 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | 30 | 30 | 376223 | use strict; | |||
30 | 56 | ||||||
30 | 1123 | ||||||
3 | 30 | 30 | 145 | use warnings; | |||
30 | 51 | ||||||
30 | 1373 | ||||||
4 | |||||||
5 | package WWW::Shopify::Liquid::Operator::Modulo; | ||||||
6 | 30 | 30 | 157 | use base 'WWW::Shopify::Liquid::Operator'; | |||
30 | 43 | ||||||
30 | 13976 | ||||||
7 | 0 | 0 | 0 | sub symbol { return '%'; } | |||
8 | 0 | 0 | 0 | sub priority { return 10; } | |||
9 | 0 | 0 | 0 | sub operate { return $_[0]->ensure_numerical($_[3]) % $_[0]->ensure_numerical($_[4]); } | |||
10 | |||||||
11 | 1; |