| blib/lib/Hash/Lazy.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| statement | 10 | 12 | 83.3 |
| branch | n/a | ||
| condition | n/a | ||
| subroutine | 4 | 4 | 100.0 |
| pod | n/a | ||
| total | 14 | 16 | 87.5 |
| line | stmt | bran | cond | sub | pod | time | code |
|---|---|---|---|---|---|---|---|
| 1 | package Hash::Lazy; | ||||||
| 2 | |||||||
| 3 | 6 | 6 | 6637 | use strict; | |||
| 6 | 13 | ||||||
| 6 | 321 | ||||||
| 4 | 6 | 6 | 30 | use warnings; | |||
| 6 | 10 | ||||||
| 6 | 464 | ||||||
| 5 | our $VERSION = '0.01'; | ||||||
| 6 | |||||||
| 7 | 6 | 67 | use Sub::Exporter -setup => { | ||||
| 8 | exports => [ qw(Hash) ], | ||||||
| 9 | groups => { default => [ qw(Hash) ] } | ||||||
| 10 | 6 | 6 | 20075 | }; | |||
| 6 | 101173 | ||||||
| 11 | |||||||
| 12 | 6 | 6 | 6786 | use Hash::Lazy::Tie; | |||
| 0 | |||||||
| 0 | |||||||
| 13 | sub Hash(&) { | ||||||
| 14 | my $cb = shift; | ||||||
| 15 | my %h = (); | ||||||
| 16 | tie %h, 'Hash::Lazy::Tie', $cb, \%h; | ||||||
| 17 | return \%h; | ||||||
| 18 | } | ||||||
| 19 | |||||||
| 20 | 1; | ||||||
| 21 | |||||||
| 22 | __END__ |