ClassAttribute/Meta/Role/Attribute.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 32 / 32 CC 2 SCAR 2.5
CC
2
Cov
100%
new
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« ClassAttribute.pm ↑ Summary ClassAttribute/Trait/Application.pm »
1 package MooseX::ClassAttribute::Meta::Role::Attribute;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 8 our $VERSION = '0.29';
7  
8 8 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 8 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use List::Util 1.45 'uniq';
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 8 extends 'Moose::Meta::Role::Attribute';
13  
14 32 ▶sub new {
Subroutine new: called CC=2 SCAR=6.9
Pod documented
15 32 my ( $class, $name, %options ) = @_;
16  
17 $options{traits} = [
18 32 ▶ uniq( @{ $options{traits} || [] } ),
Condition100%2/2
$options{'traits'} || []
l!l
2012
MC/DC100%1/1
$options{'traits'} || []
$options{'traits'}
Truth table100%2/2
A
A= $options{'traits'}
Aresult
11
00
19 'MooseX::ClassAttribute::Trait::Attribute'
20 ];
21  
22 32 return $class->SUPER::new( $name, %options );
23 }
24  
25 8 1;
26  
27 # ABSTRACT: An attribute metaclass for class attributes in roles
28  
29 __END__
« ClassAttribute.pm ↑ Summary ClassAttribute/Trait/Application.pm »