blib/lib/Template/Pure/EncodedString.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 14 | 14 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 6 | 6 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 20 | 22 | 90.9 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Template::Pure::EncodedString; | ||||||
2 | |||||||
3 | 26 | 26 | 108 | use strict; | |||
26 | 27 | ||||||
26 | 587 | ||||||
4 | 26 | 26 | 81 | use warnings; | |||
26 | 25 | ||||||
26 | 952 | ||||||
5 | |||||||
6 | 26 | 26 | 85 | use overload q{""} => sub { shift->as_string }, fallback => 1; | |||
26 | 48 | 25 | |||||
26 | 162 | ||||||
48 | 1694 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 58 | 58 | 0 | 78 | my ($klass, $str) = @_; | ||
10 | 58 | 191 | bless \$str, $klass; | ||||
11 | } | ||||||
12 | |||||||
13 | sub as_string { | ||||||
14 | 48 | 48 | 0 | 63 | my $self = shift; | ||
15 | 48 | 126 | $$self; | ||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 |