blib/lib/WWW/Shopify/Liquid/Dialect/Shopify/Filter/UrlForProduct.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 13 | 69.2 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 5 | 60.0 |
pod | 0 | 2 | 0.0 |
total | 12 | 20 | 60.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | 1 | 1 | 285 | use strict; | |||
1 | 2 | ||||||
1 | 22 | ||||||
3 | 1 | 1 | 4 | use warnings; | |||
1 | 1 | ||||||
1 | 28 | ||||||
4 | |||||||
5 | 1 | 1 | 5 | package WWW::Shopify::Liquid::Dialect::Shopify::Filter::UrlForProduct; use base 'WWW::Shopify::Liquid::Filter'; | |||
1 | 1 | ||||||
1 | 118 | ||||||
6 | 0 | 0 | 0 | sub max_arguments { return 1; } | |||
7 | 0 | 0 | 0 | sub operate { my $str = $_[2]; $str =~ s/\s/-/g; return "/products/" . lc($str); } | |||
0 | |||||||
0 | |||||||
8 | |||||||
9 | |||||||
10 | 1; |