blib/lib/WWW/Shopify/Liquid/Filter/StripHtml.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 13 | 69.2 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 3 | 4 | 75.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 20 | 60.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | 37 | 37 | 15188 | use strict; | |||
37 | 108 | ||||||
37 | 1137 | ||||||
3 | 37 | 37 | 272 | use warnings; | |||
37 | 113 | ||||||
37 | 1611 | ||||||
4 | |||||||
5 | 37 | 37 | 312 | package WWW::Shopify::Liquid::Filter::StripHtml; use base 'WWW::Shopify::Liquid::Filter'; | |||
37 | 111 | ||||||
37 | 6868 | ||||||
6 | sub operate { | ||||||
7 | 0 | 0 | 0 | my ($self, $hash, $argument) = @_; | |||
8 | 0 | 0 | $argument = '' unless defined $argument; | ||||
9 | 0 | $argument =~ s/<[^>]+>//g; | |||||
10 | 0 | return $argument; | |||||
11 | } | ||||||
12 | |||||||
13 | 1; |