File Coverage

blib/lib/Set/Associate/Role/NewKey.pm
Criterion Covered Total %
statement 14 14 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 19 19 100.0


line stmt bran cond sub pod time code
1 22     22   12163 use 5.006;
  22         61  
2 22     22   110 use strict;
  22         48  
  22         471  
3 22     22   76 use warnings;
  22         79  
  22         1374  
4              
5             package Set::Associate::Role::NewKey;
6              
7             # ABSTRACT: A Key Association methodology for Set::Associate
8              
9             our $VERSION = '0.004001';
10              
11             our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12              
13 22     22   2889 use MooseX::Role::Parameterized qw( parameter role requires );
  22         812335  
  22         175  
14              
15             parameter can_get_next => (
16             isa => Bool =>,
17             is => rw =>,
18             default => sub { undef },
19             );
20              
21             parameter can_get_assoc => (
22             isa => Bool =>,
23             is => rw =>,
24             default => sub { undef },
25             );
26              
27             role {
28             my $p = shift;
29              
30             requires name =>;
31              
32             if ( $p->can_get_next ) {
33             requires get_next =>;
34             }
35             if ( $p->can_get_assoc ) {
36             requires get_assoc =>;
37             }
38              
39             };
40              
41 22     22   236281 no MooseX::Role::Parameterized;
  22         60  
  22         94  
42              
43             1;
44              
45             __END__
46              
47             =pod
48              
49             =encoding UTF-8
50              
51             =head1 NAME
52              
53             Set::Associate::Role::NewKey - A Key Association methodology for Set::Associate
54              
55             =head1 VERSION
56              
57             version 0.004001
58              
59             =head1 AUTHOR
60              
61             Kent Fredric <kentnl@cpan.org>
62              
63             =head1 COPYRIGHT AND LICENSE
64              
65             This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
66              
67             This is free software; you can redistribute it and/or modify it under
68             the same terms as the Perl 5 programming language system itself.
69              
70             =cut