Riak/Role/Base.pm

filter: Statementstmt 100% 14 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 16 / 16 CC 2 SCAR 5.1
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
CRAP 1.7
« Riak/Role/MapReduce.pm ↑ Summary Riak/Transport/PBC/Code.pm »
1 package Net::Riak::Role::Base;
2 {
3 21 $Net::Riak::Role::Base::VERSION = '0.1702';
4 }
5  
6 21 ▶use MooseX::Role::Parameterized;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 21 parameter classes => (
9 isa => 'ArrayRef',
10 required => 1,
11 );
12  
13 63 ▶role {
Subroutine __ANON__: called CC=2 SCAR=6.9
14 63 my $p = shift;
15  
16 63 my $attributes = $p->classes;
17  
18 63 foreach my $attr (@$attributes) {
19 84 my $name = $attr->{name};
20 my $required = $attr->{required},
21 84 my $class = "Net::Riak::" . (ucfirst $name);
22 84 has $name => (
23 is => 'rw',
24 isa => $class,
25 required => $required,
26 );
27 }
28 21 };
29  
30 21 1;
31  
32 __END__
« Riak/Role/MapReduce.pm ↑ Summary Riak/Transport/PBC/Code.pm »