blib/lib/DTL/Fast/Filter/Addslashes.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 17 | 17 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 5 | 5 | 100.0 |
pod | 0 | 1 | 0.0 |
total | 22 | 23 | 95.6 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package DTL::Fast::Filter::Addslashes; | ||||||
2 | 2 | 2 | 690 | use strict; | |||
2 | 4 | ||||||
2 | 41 | ||||||
3 | 2 | 2 | 10 | use utf8; | |||
2 | 3 | ||||||
2 | 9 | ||||||
4 | 2 | 2 | 36 | use warnings FATAL => 'all'; | |||
2 | 4 | ||||||
2 | 50 | ||||||
5 | 2 | 2 | 8 | use parent 'DTL::Fast::Filter'; | |||
2 | 4 | ||||||
2 | 8 | ||||||
6 | |||||||
7 | $DTL::Fast::FILTER_HANDLERS{addslashes} = __PACKAGE__; | ||||||
8 | |||||||
9 | #@Override | ||||||
10 | sub filter | ||||||
11 | { | ||||||
12 | 4 | 4 | 0 | 8 | shift; # self | ||
13 | 4 | 7 | shift; # filter_manager | ||||
14 | 4 | 8 | my $value = shift; | ||||
15 | 4 | 36 | $value =~ s/(? | ||||
16 | 4 | 14 | return $value; | ||||
17 | } | ||||||
18 | |||||||
19 | 1; |