blib/lib/Facebook/InstantArticle/BaseElement.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | 1 | 2 | 50.0 |
subroutine | 3 | 3 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 16 | 18 | 88.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Facebook::InstantArticle::BaseElement; | ||||||
2 | 2 | 2 | 1831 | use Moose; | |||
2 | 5 | ||||||
2 | 21 | ||||||
3 | 2 | 2 | 14798 | use namespace::autoclean; | |||
2 | 4 | ||||||
2 | 16 | ||||||
4 | |||||||
5 | sub squeeze { | ||||||
6 | 4 | 4 | 0 | 4 | my $self = shift; | ||
7 | 4 | 50 | 12 | my $str = shift // ''; | |||
8 | |||||||
9 | 4 | 23 | $str =~ s/\s+/ /sg; | ||||
10 | 4 | 9 | $str =~ s/^\s+//; | ||||
11 | 4 | 15 | $str =~ s/\s+$//; | ||||
12 | |||||||
13 | 4 | 163 | return $str; | ||||
14 | } | ||||||
15 | |||||||
16 | 1; |