| 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 | 346011 | use strict; | |||
| 6 | 56 | ||||||
| 6 | 149 | ||||||
| 4 | 6 | 6 | 25 | use warnings; | |||
| 6 | 8 | ||||||
| 6 | 296 | ||||||
| 5 | our $VERSION = '0.04'; | ||||||
| 6 | |||||||
| 7 | 6 | 47 | use Sub::Exporter -setup => { | ||||
| 8 | exports => [ qw(Hash) ], | ||||||
| 9 | groups => { default => [ qw(Hash) ] } | ||||||
| 10 | 6 | 6 | 2815 | }; | |||
| 6 | 61352 | ||||||
| 11 | |||||||
| 12 | 6 | 6 | 4533 | use Hash::Lazy::Tie; | |||
| 6 | 23 | ||||||
| 6 | 440 | ||||||
| 13 | sub Hash(&) { | ||||||
| 14 | 5 | 5 | 0 | 494 | my $cb = shift; | ||
| 15 | 5 | 12 | my %h = (); | ||||
| 16 | 5 | 38 | tie %h, 'Hash::Lazy::Tie', $cb, \%h; | ||||
| 17 | 5 | 17 | return \%h; | ||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; | ||||||
| 21 | |||||||
| 22 | __END__ |