Moose/Role.pm

filter: Statementstmt 72.5% 66 / 91 Branchbran 30.0% 6 / 20 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 78.9% 15 / 19 Podpod 0.0% 0 / 3 totaltotal 65.4% 87 / 133 CC 12 SCAR 12.5
CC
12
Cov
65%
Tags
7.5
Tests
7.5
Test
5.0
CRAP 3.5
« Moose/Executor/Parallel.pm ↑ Summary Moose.pm »
1 package Test::Class::Moose::Role;
2  
3 # ABSTRACT: Test::Class::Moose for roles
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 2 ▶use 5.010000;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 2 our $VERSION = '1.00';
12  
13 2 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 2 ▶use Sub::Attribute;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 2 ▶use Import::Into;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 2 ▶use Test::Class::Moose::AttributeRegistry;
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 2 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=10.3
20 2 require Test::Class::Moose;
21 ## no critic (BuiltinFunctions::ProhibitStringyEval, ErrorHandling::RequireCheckingReturnValueOfEval)
22 ## no critic (Subroutines::ProtectPrivateSubs)
23 0 ▶ eval Test::Class::Moose->__sub_attr_declaration_code;
Subroutine BEGIN: called CC=1 SCAR=2.0
Subroutine BEGIN: called CC=1 SCAR=2.0
Subroutine BEGIN: called CC=1 SCAR=2.0
Subroutine Tags: called CC=4 SCAR=20.2
Subroutine Test: not called CC=3 SCAR=16.0
Subroutine Tests: not called CC=4 SCAR=20.2
Subroutine __ANON__: not called CC=1 SCAR=2.0
Subroutine __ANON__: not called CC=1 SCAR=2.0
Pod undocumented
Pod undocumented
Pod undocumented
Branch: 8 branches
BranchTrueFalseTotal
if ($data) 2 0 2
if ($symbol eq "ANON") 0 2 2
if ($@) 0 2 2
if ($symbol eq "ANON") 0 0 0
if ($method =~ /^test_(?:startup|setup|teardown|shutdown)$/) 0 0 0
if ($symbol eq "ANON") 0 0 0
if ($method =~ /^test_(?:startup|setup|teardown|shutdown)$/) 0 0 0
if (defined $data) 0 0 0
24 2 ▶ croak($@) if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 0 2 2
25 }
26  
27 2 ▶sub import {
Subroutine import: called CC=3 SCAR=11.0
28 2 shift;
29 2 my %args = @_;
30  
31 2 my $caller = caller;
32  
33 2 my @imports = qw(
34 Moose::Role
35 Sub::Attribute
36 strict
37 warnings
38 );
39  
40 2 ▶ unless ( $args{bare} ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($args{"bare"}) 1 1 2
41 1 require Test::Most;
42 1 push @imports, 'Test::Most';
43 }
44  
45 2 $_->import::into($caller) for @imports;
46  
47 ## no critic (TestingAndDebugging::ProhibitNoStrict)
48 2 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
49 1 *{"$caller\::Tags"} = \&Tags;
50 1 *{"$caller\::Test"} = \&Test;
51 1 *{"$caller\::Tests"} = \&Tests;
52 }
53  
54 2 1;
55  
56 __END__
« Moose/Executor/Parallel.pm ↑ Summary Moose.pm »