blib/lib/Class/C3/XS.pm

filter: Statementstmt 100% 15 / 15 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 100% 23 / 23 CC 2 SCAR 3.4
CC
2
Cov
100%
method
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
↑ Summary XS.xs »
1 package Class::C3::XS; # git description: v0.14-7-gf53d46e
2 # ABSTRACT: XS speedups for Class::C3
3  
4 12 ▶use 5.006_000;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 12 our $VERSION = '0.15';
9  
10 #pod =pod
11 #pod
12 #pod =head1 SYNOPSIS
13 #pod
14 #pod use Class::C3; # Automatically loads Class::C3::XS
15 #pod # if it's installed locally
16 #pod
17 #pod =head1 DESCRIPTION
18 #pod
19 #pod This contains XS performance enhancers for L<Class::C3> version
20 #pod 0.16 and higher. The main L<Class::C3> package will use this
21 #pod package automatically if it can find it. Do not use this
22 #pod package directly, use L<Class::C3> instead.
23 #pod
24 #pod The test suite here is not complete, although it does verify
25 #pod a few basic things. The best testing comes from running the
26 #pod L<Class::C3> test suite *after* this module is installed.
27 #pod
28 #pod This module won't do anything for you if you're running a
29 #pod version of L<Class::C3> older than 0.16. (It's not a
30 #pod dependency because it would be circular with the optional
31 #pod dependency from that package to this one).
32 #pod
33 #pod =cut
34  
35 12 require XSLoader;
36 12 XSLoader::load('Class::C3::XS', $VERSION);
37  
38 package # hide me from PAUSE
39 next;
40  
41 3 ▶sub can { Class::C3::XS::_nextcan($_[0], 0) }
Subroutine can: called
42  
43 20 ▶sub method {
Subroutine method: called
44 my $method = Class::C3::XS::_nextcan($_[0], 1);
45 goto &$method;
46 }
47  
48 package # hide me from PAUSE
49 maybe::next;
50  
51 4 ▶sub method {
Subroutine method: called CC=2 SCAR=6.9
52 4 my $method = Class::C3::XS::_nextcan($_[0], 0);
53 4 ▶ goto &$method if defined $method;
Branch: 1 branch
BranchTrueFalseTotal
if defined $method 2 2 4
54 2 return;
55 }
56  
57 12 1;
58  
59 __END__
↑ Summary XS.xs »