blib/lib/MooX/Struct/Util.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 11 | 11 | 100.0 |
branch | n/a | ||
condition | n/a | ||
subroutine | 4 | 4 | 100.0 |
pod | 1 | 1 | 100.0 |
total | 16 | 16 | 100.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package MooX::Struct::Util; | ||||||
2 | |||||||
3 | our $AUTHORITY = 'cpan:TOBYINK'; | ||||||
4 | our $VERSION = '0.019'; | ||||||
5 | |||||||
6 | 1 | 1 | 69129 | use strict; | |||
1 | 11 | ||||||
1 | 30 | ||||||
7 | 1 | 1 | 5 | use warnings; | |||
1 | 2 | ||||||
1 | 24 | ||||||
8 | 1 | 1 | 511 | use Exporter::Tiny (); | |||
1 | 3337 | ||||||
1 | 85 | ||||||
9 | |||||||
10 | our @ISA = qw(Exporter::Tiny); | ||||||
11 | our @EXPORT = qw(lazy_default); | ||||||
12 | |||||||
13 | sub lazy_default (&) | ||||||
14 | { | ||||||
15 | 1 | 1 | 1 | 83 | my $sub = shift; | ||
16 | return [ | ||||||
17 | 1 | 7 | lazy => 1, | ||||
18 | default => $sub, | ||||||
19 | ]; | ||||||
20 | } | ||||||
21 | |||||||
22 | 1; | ||||||
23 | |||||||
24 | __END__ |