blib/lib/Text/Pipe/HTML/EncodeEntities.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 18 | 18 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 25 | 25 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | 1 | 1 | 891 | use 5.008; | |||
1 | 5 | ||||||
1 | 44 | ||||||
2 | 1 | 1 | 6 | use strict; | |||
1 | 3 | ||||||
1 | 34 | ||||||
3 | 1 | 1 | 5 | use warnings; | |||
1 | 2 | ||||||
1 | 59 | ||||||
4 | |||||||
5 | package Text::Pipe::HTML::EncodeEntities; | ||||||
6 | our $VERSION = '1.100880'; | ||||||
7 | # ABSTRACT: Text pipe that can encode HTML entities | ||||||
8 | 1 | 1 | 5 | use HTML::Entities; | |||
1 | 2 | ||||||
1 | 78 | ||||||
9 | 1 | 1 | 128 | use parent qw(Text::Pipe::HTML); | |||
1 | 10 | ||||||
1 | 8 | ||||||
10 | |||||||
11 | sub filter_single { | ||||||
12 | 2 | 2 | 1 | 15 | my ($self, $input) = @_; | ||
13 | 2 | 8 | encode_entities($input); | ||||
14 | 2 | 49 | $input; | ||||
15 | } | ||||||
16 | 1; | ||||||
17 | |||||||
18 | |||||||
19 | __END__ |