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 | 84 | use strict; | |||
26 | 27 | ||||||
26 | 563 | ||||||
4 | 26 | 26 | 69 | use warnings; | |||
26 | 25 | ||||||
26 | 928 | ||||||
5 | |||||||
6 | 26 | 26 | 82 | use overload q{""} => sub { shift->as_string }, fallback => 1; | |||
26 | 48 | 23 | |||||
26 | 155 | ||||||
48 | 1701 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 58 | 58 | 0 | 80 | my ($klass, $str) = @_; | ||
10 | 58 | 199 | bless \$str, $klass; | ||||
11 | } | ||||||
12 | |||||||
13 | sub as_string { | ||||||
14 | 48 | 48 | 0 | 52 | my $self = shift; | ||
15 | 48 | 119 | $$self; | ||||
16 | } | ||||||
17 | |||||||
18 | 1; | ||||||
19 |