blib/lib/MassSpec/CUtilities.pm

filter: Statementstmt 71.0% 27 / 38 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod n/a totaltotal 66.0% 33 / 50 CC 3 SCAR 11.8
CC
3
Cov
64%
AUTOLOAD
8.2
__ANON__
2.0
BEGIN
1.0
CRAP 3.3
↑ Summary CUtilities.xs »
1 package MassSpec::CUtilities;
2
3 1 ▶use 5.008;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7
8 1 require Exporter;
9 1 ▶use AutoLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
10
11 1 our @ISA = qw(Exporter);
12
13 # Items to export into callers namespace by default. Note: do not export
14 # names by default without a very good reason. Use EXPORT_OK instead.
15 # Do not simply export all your public functions/methods/constants.
16
17 # This allows declaration use MassSpec::CUtilities ':all';
18 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
19 # will save memory.
20 1 our %EXPORT_TAGS = ( 'all' => [ qw(
21
22 ) ] );
23
24 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
25
26 1 our @EXPORT = qw(
27
28 );
29
30 1 our $VERSION = '0.05';
31
32 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=3 SCAR=21.1
33 # This AUTOLOAD is used to 'autoload' constants from the constant()
34 # XS function.
35
36 0 my $constname;
37 0 our $AUTOLOAD;
38 0 ($constname = $AUTOLOAD) =~ s/.*:://;
39 0 ▶ croak "&MassSpec::CUtilities::constant not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 0 0
40 0 my ($error, $val) = constant($constname);
41 0 ▶ if ($error) { croak $error; }
Branch: 1 branch
BranchTrueFalseTotal
if ($error) 0 0 0
42 {
43 0 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.2
44 # Fixed between 5.005_53 and 5.005_61
45 #XXX if ($] >= 5.00561) {
46 #XXX *$AUTOLOAD = sub () { $val };
47 #XXX }
48 #XXX else {
49 0 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: not called CC=1 SCAR=6.9
50 #XXX }
51 }
52 0 goto &$AUTOLOAD;
53 }
54
55 1 require XSLoader;
56 1 XSLoader::load('MassSpec::CUtilities', $VERSION);
57
58 # Preloaded methods go here.
59
60 # Autoload methods go after =cut, and are processed by the autosplit program.
61
62 1 1;
63 __END__
↑ Summary CUtilities.xs »