blib/lib/Context/Handle/RV/Scalar.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 12 | 12 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 0 | 2 | 0.0 |
total | 16 | 18 | 88.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | |||||||
3 | package Context::Handle::RV::Scalar; | ||||||
4 | |||||||
5 | 2 | 2 | 11 | use strict; | |||
2 | 3 | ||||||
2 | 71 | ||||||
6 | 2 | 2 | 10 | use warnings; | |||
2 | 5 | ||||||
2 | 169 | ||||||
7 | |||||||
8 | sub new { | ||||||
9 | 5 | 5 | 0 | 9 | my $pkg = shift; | ||
10 | 5 | 6 | my $code = shift; | ||||
11 | |||||||
12 | 5 | 13 | my $val = $code->(); | ||||
13 | 4 | 279 | bless \$val, $pkg; | ||||
14 | } | ||||||
15 | |||||||
16 | sub value { | ||||||
17 | 4 | 4 | 0 | 6 | my $self = shift; | ||
18 | 4 | 22 | $$self; | ||||
19 | } | ||||||
20 | |||||||
21 | __PACKAGE__; | ||||||
22 | |||||||
23 | __END__ |