blib/lib/Context/Handle/RV/RefObject.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 9 | 15 | 60.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 3 | 6 | 50.0 |
pod | 0 | 1 | 0.0 |
total | 12 | 22 | 54.5 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | #!/usr/bin/perl | ||||||
2 | |||||||
3 | package Context::Handle::RV::RefObject; | ||||||
4 | 2 | 2 | 9 | use base qw/Context::Handle::RV::Scalar/; | |||
2 | 2 | ||||||
2 | 126 | ||||||
5 | |||||||
6 | 2 | 2 | 9 | use strict; | |||
2 | 4 | ||||||
2 | 49 | ||||||
7 | 2 | 2 | 9 | use warnings; | |||
2 | 3 | ||||||
2 | 218 | ||||||
8 | |||||||
9 | sub new { | ||||||
10 | 0 | 0 | 0 | my $class = shift; | |||
11 | 0 | my $code = shift; | |||||
12 | |||||||
13 | 0 | 0 | my $nop = sub { $_[0] }; | ||||
0 | |||||||
14 | 0 | 0 | $class->SUPER::new( sub { $code->()->$nop } ); | ||||
0 | |||||||
15 | } | ||||||
16 | |||||||
17 | __PACKAGE__; | ||||||
18 | |||||||
19 | __END__ |