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 | 849 | use Moose; | |||
2 | 17 | ||||||
2 | 12 | ||||||
3 | 2 | 2 | 11546 | use namespace::autoclean; | |||
2 | 6 | ||||||
2 | 12 | ||||||
4 | |||||||
5 | sub squeeze { | ||||||
6 | 4 | 4 | 0 | 8 | my $self = shift; | ||
7 | 4 | 50 | 44 | my $str = shift // ''; | |||
8 | |||||||
9 | 4 | 19 | $str =~ s/\s+/ /sg; | ||||
10 | 4 | 10 | $str =~ s/^\s+//; | ||||
11 | 4 | 10 | $str =~ s/\s+$//; | ||||
12 | |||||||
13 | 4 | 113 | return $str; | ||||
14 | } | ||||||
15 | |||||||
16 | 1; |