blib/lib/Set/Associate/Role/NewKey.pm

filter: Statementstmt 92.8% 26 / 28 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 87.5% 35 / 40 CC 3 SCAR 5.7
CC
3
Cov
88%
__ANON__
3.2
__ANON__
2.0
BEGIN
1.0
CRAP 1.8
« lib/Set/Associate/NewKey.pm ↑ Summary lib/Set/Associate.pm »
1 22 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 22 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 22 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Set::Associate::Role::NewKey;
6  
7 # ABSTRACT: A Key Association methodology for Set::Associate
8  
9 22 our $VERSION = '0.004000';
10  
11 22 our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY
12  
13 22 ▶use MooseX::Role::Parameterized qw( parameter role requires );
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 parameter can_get_next => (
16 isa => Bool =>,
17 is => rw =>,
18 30 ▶ default => sub { undef },
Subroutine __ANON__: called CC=1 SCAR=0.0
19 22 );
20  
21 parameter can_get_assoc => (
22 isa => Bool =>,
23 is => rw =>,
24 0 ▶ default => sub { undef },
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 22 );
26  
27 role {
28 30 ▶ my $p = shift;
Subroutine __ANON__: called CC=3 SCAR=11.8
29  
30 30 requires name =>;
31  
32 30 ▶ if ( $p->can_get_next ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($p->can_get_next) 0 30 30
33 0 requires get_next =>;
34 }
35 30 ▶ if ( $p->can_get_assoc ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($p->can_get_assoc) 30 0 30
36 30 requires get_assoc =>;
37 }
38  
39 22 };
40  
41 22 ▶no MooseX::Role::Parameterized;
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43 22 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.004000
58  
59 =head1 AUTHOR
60  
61 Kent Fredric <kentnl@cpan.org>
62  
63 =head1 COPYRIGHT AND LICENSE
64  
65 This software is copyright (c) 2015 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
« lib/Set/Associate/NewKey.pm ↑ Summary lib/Set/Associate.pm »