blib/lib/Linux/Personality.pm

filter: Statementstmt 97.3% 36 / 37 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 93.7% 45 / 48 CC 3 SCAR 5.2
CC
3
Cov
93%
AUTOLOAD
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.7
↑ Summary const-c.inc »
1 package Linux::Personality;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 require Exporter;
8 1 ▶use AutoLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 our @ISA = qw(Exporter);
11  
12 # Items to export into callers namespace by default. Note: do not export
13 # names by default without a very good reason. Use EXPORT_OK instead.
14 # Do not simply export all your public functions/methods/constants.
15  
16 # This allows declaration use Linux::Personality ':all';
17 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
18 # will save memory.
19  
20 1 our @EXPORT = ();
21 1 our %EXPORT_TAGS = (
22 'funcs' => [ qw/ personality / ],
23 'consts' => [ qw/ ADDR_LIMIT_32BIT
24 ADDR_LIMIT_3GB
25 ADDR_NO_RANDOMIZE
26 MMAP_PAGE_ZERO
27 PER_BSD
28 PER_HPUX
29 PER_IRIX32
30 PER_IRIX64
31 PER_IRIXN32
32 PER_ISCR4
33 PER_LINUX
34 PER_LINUX32
35 PER_LINUX32_3GB
36 PER_LINUX_32BIT
37 PER_MASK
38 PER_OSF4
39 PER_OSR5
40 PER_RISCOS
41 PER_SCOSVR3
42 PER_SOLARIS
43 PER_SUNOS
44 PER_SVR3
45 PER_SVR4
46 PER_UW7
47 PER_WYSEV386
48 PER_XENIX
49 SHORT_INODE
50 STICKY_TIMEOUTS
51 WHOLE_SECONDS
52 / ],
53 # ADDR_COMPAT_LAYOUT # not in 2.6.28
54 # READ_IMPLIES_EXEC # not in 2.6.28
55 );
56 1 our @EXPORT_OK = map { @$_ } values %EXPORT_TAGS;
57 1 $EXPORT_TAGS{'all'} = [ @EXPORT_OK ];
58  
59 1 our $VERSION = '0.01';
60  
61 1 ▶sub AUTOLOAD {
Subroutine AUTOLOAD: called CC=3 SCAR=11.1
62 # This AUTOLOAD is used to 'autoload' constants from the constant()
63 # XS function.
64  
65 1 my $constname;
66 1 our $AUTOLOAD;
67 1 ($constname = $AUTOLOAD) =~ s/.*:://;
68 1 ▶ croak "&Linux::Personality::constant not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 1 1
69 1 my ($error, $val) = constant($constname);
70 0 ▶ if ($error) { croak $error; }
Branch: 1 branch
BranchTrueFalseTotal
if ($error) 0 1 1
71 {
72 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
73 # Fixed between 5.005_53 and 5.005_61
74 #XXX if ($] >= 5.00561) {
75 #XXX *$AUTOLOAD = sub () { $val };
76 #XXX }
77 #XXX else {
78 1 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: called CC=1 SCAR=0.0
79 #XXX }
80 }
81 1 goto &$AUTOLOAD;
82 }
83  
84 1 require XSLoader;
85 1 XSLoader::load('Linux::Personality', $VERSION);
86  
87 # Preloaded methods go here.
88  
89 # Autoload methods go after =cut, and are processed by the autosplit program.
90  
91 1 1;
92 __END__
↑ Summary const-c.inc »