| 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
| |||||||||||||||||||||||||||||||||||||||
| 24 | 2 | ▶ | croak($@) if $@; | ||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||
| 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
| |||||||||||||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||||||||||||