blib/lib/WWW/Shopify/Liquid/Filter/Camelize.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 15 | 60.0 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 3 | 5 | 60.0 |
pod | 0 | 2 | 0.0 |
total | 12 | 24 | 50.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | 37 | 37 | 15072 | use strict; | |||
37 | 94 | ||||||
37 | 1100 | ||||||
3 | 37 | 37 | 231 | use warnings; | |||
37 | 89 | ||||||
37 | 1406 | ||||||
4 | |||||||
5 | 37 | 37 | 347 | package WWW::Shopify::Liquid::Filter::Camelize; use base 'WWW::Shopify::Liquid::Filter'; | |||
37 | 91 | ||||||
37 | 7527 | ||||||
6 | 0 | 0 | 0 | sub max_arguments { return 0; } | |||
7 | 0 | 0 | 0 | 0 | sub operate { my $str = $_[2]; return '' unless defined $str; $str =~ s/-(\w?)/return " " . uc($1);/ge; return $str; } | ||
0 | |||||||
0 | |||||||
0 | |||||||
0 | |||||||
8 | |||||||
9 | 1; |