blib/lib/Linux/Pdeathsig.pm

filter: Statementstmt 72.5% 29 / 40 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 6 / 8 Podpod n/a totaltotal 67.3% 35 / 52 CC 3 SCAR 11.8
CC
3
Cov
66%
AUTOLOAD
8.2
__ANON__
2.0
BEGIN
1.0
CRAP 3.3
↑ Summary const-c.inc »
1 package Linux::Pdeathsig;
2  
3 1 ▶use 5.008007;
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 Linux::Pdeathsig ':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 set_pdeathsig
22 get_pdeathsig
23 ) ] );
24  
25 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
26  
27 1 our @EXPORT = qw(
28 set_pdeathsig
29 get_pdeathsig
30 );
31  
32 1 our $VERSION = '0.10';
33 1 our $XS_VERSION = $VERSION;
34 1 $VERSION = eval $VERSION; # see L<perlmodstyle>
35  
36 0 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: not called CC=3 SCAR=21.1
37 # This AUTOLOAD is used to 'autoload' constants from the constant()
38 # XS function.
39  
40 0 my $constname;
41 0 our $AUTOLOAD;
42 0 ($constname = $AUTOLOAD) =~ s/.*:://;
43 0 ▶ croak "&Linux::Pdeathsig::constant not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 0 0
44 0 my ($error, $val) = constant($constname);
45 0 ▶ if ($error) { croak $error; }
Branch: 1 branch
BranchTrueFalseTotal
if ($error) 0 0 0
46 {
47 0 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.2
48 # Fixed between 5.005_53 and 5.005_61
49 #XXX if ($] >= 5.00561) {
50 #XXX *$AUTOLOAD = sub () { $val };
51 #XXX }
52 #XXX else {
53 0 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: not called CC=1 SCAR=6.9
54 #XXX }
55 }
56 0 goto &$AUTOLOAD;
57 }
58  
59 1 require XSLoader;
60 1 XSLoader::load('Linux::Pdeathsig', $XS_VERSION);
61  
62 # Preloaded methods go here.
63  
64 # Autoload methods go after =cut, and are processed by the autosplit program.
65  
66 1 1;
67 __END__
↑ Summary const-c.inc »