Foreign.pm

filter: Statementstmt 95.0% 19 / 20 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 93.1% 27 / 29 CC 3 SCAR 6.3
CC
3
Cov
92%
import
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.9
« NonMoose/Meta/Role/Method/Destructor.pm ↑ Summary NonMoose.pm »
1 package MouseX::Foreign;
2 29 ▶use 5.008_001;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 29 ▶use Mouse::Util; # turns on strict and warnings
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 29 our $VERSION = '1.000';
6  
7 29 ▶use Mouse::Util::MetaRole;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 29 ▶use Carp ();
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 39 ▶sub import {
Subroutine import: called CC=3 SCAR=11.2
11 39 shift;
12  
13 39 my $caller = caller;
14 39 ▶ if(!$caller->can('meta')){
Branch: 1 branch
BranchTrueFalseTotal
unless ($caller->can("meta")) 0 39 39
15 0 Carp::croak(
16 "$caller does not have the meta method"
17 . " (did you use Mouse for $caller?)");
18 }
19  
20 Mouse::Util::MetaRole::apply_metaroles(
21 39 for => $caller,
22 class_metaroles => {
23 class => ['MouseX::Foreign::Meta::Role::Class'],
24 },
25 );
26  
27 39 ▶ $caller->meta->superclasses(@_) if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 4 35 39
28 39 return;
29 }
30  
31 29 1;
32 __END__
« NonMoose/Meta/Role/Method/Destructor.pm ↑ Summary NonMoose.pm »