| blib/lib/Hash/Lazy.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 16 | 16 | 100.0 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 5 | 5 | 100.0 |
| pod | 0 | 1 | 0.0 |
| total | 21 | 22 | 95.4 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Hash::Lazy; | ||||||
| 2 | |||||||
| 3 | 6 | 6 | 406169 | use strict; | |||
| 6 | 56 | ||||||
| 6 | 180 | ||||||
| 4 | 6 | 6 | 31 | use warnings; | |||
| 6 | 9 | ||||||
| 6 | 326 | ||||||
| 5 | our $VERSION = '0.03'; | ||||||
| 6 | |||||||
| 7 | 6 | 48 | use Sub::Exporter -setup => { | ||||
| 8 | exports => [ qw(Hash) ], | ||||||
| 9 | groups => { default => [ qw(Hash) ] } | ||||||
| 10 | 6 | 6 | 3353 | }; | |||
| 6 | 73931 | ||||||
| 11 | |||||||
| 12 | 6 | 6 | 5183 | use Hash::Lazy::Tie; | |||
| 6 | 19 | ||||||
| 6 | 522 | ||||||
| 13 | sub Hash(&) { | ||||||
| 14 | 5 | 5 | 0 | 569 | my $cb = shift; | ||
| 15 | 5 | 15 | my %h = (); | ||||
| 16 | 5 | 49 | tie %h, 'Hash::Lazy::Tie', $cb, \%h; | ||||
| 17 | 5 | 17 | return \%h; | ||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; | ||||||
| 21 | |||||||
| 22 | __END__ |