blib/lib/Safe/Isa/XS.pm

filter: Statementstmt 100% 26 / 26 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 34 / 34 CC 2 SCAR 2.5
CC
2
Cov
100%
__ANON__
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
↑ Summary const-c.inc »
1 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use strict qw( vars subs );
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 package Safe::Isa::XS;
6  
7 1 ▶use base qw( XSLoader Exporter );
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use Scalar::Util qw( blessed );
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our $AUTHORITY = 'cpan:TOBYINK';
11 1 our $VERSION = '0.000_02';
12 1 our @EXPORT = qw( $_call_if_object $_isa $_can $_does $_DOES );
13  
14 1 __PACKAGE__->load($VERSION);
15  
16 1 for (qw( _isa _can _does _DOES )) {
17 4 ${"Safe::Isa::XS::$_"} = \&$_;
18 }
19  
20 # Too lazy to write an XS version of this...
21 3 ▶our $_call_if_object = sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
22 3 my ($obj, $method) = (shift, shift);
23 3 ▶ return unless blessed($obj);
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($obj) 1 2 3
24 2 return $obj->$method(@_);
25 1 };
26  
27 1 shift our @ISA;
28  
29 __END__
↑ Summary const-c.inc »