blib/lib/WWW/Shopify/Liquid/Filter/Keys.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | 1 | 2 | 50.0 |
condition | 1 | 3 | 33.3 |
subroutine | 4 | 4 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 18 | 22 | 81.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | 37 | 37 | 16432 | use strict; | |||
37 | 114 | ||||||
37 | 1221 | ||||||
3 | 37 | 37 | 263 | use warnings; | |||
37 | 102 | ||||||
37 | 3618 | ||||||
4 | |||||||
5 | package WWW::Shopify::Liquid::Filter::Keys; | ||||||
6 | 37 | 37 | 258 | use base 'WWW::Shopify::Liquid::Filter'; | |||
37 | 1881 | ||||||
37 | 5844 | ||||||
7 | |||||||
8 | sub operate { | ||||||
9 | 1 | 50 | 33 | 1 | 0 | 9 | return undef unless ref($_[2]) && ref($_[2]) eq 'HASH'; |
10 | 1 | 4 | return [keys(%{$_[2]})]; | ||||
1 | 65 | ||||||
11 | } | ||||||
12 | |||||||
13 | 1; |