blib/lib/Linux/Shadow.pm

filter: Statementstmt 97.5% 40 / 41 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 94.4% 51 / 54 CC 3 SCAR 4.4
CC
3
Cov
93%
AUTOLOAD
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.6
↑ Summary Shadow.xs »
1 package Linux::Shadow;
2  
3 1 ▶use 5.010001;
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 feature 'state';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 require Exporter;
10 1 ▶use AutoLoader;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 our @ISA = qw(Exporter);
13  
14 # Items to export into callers namespace by default. Note: do not export
15 # names by default without a very good reason. Use EXPORT_OK instead.
16 # Do not simply export all your public functions/methods/constants.
17  
18 # This allows declaration use Linux::Shadow ':all';
19 # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
20 # will save memory.
21 1 our %EXPORT_TAGS = ( 'all' => [ qw(
22 SHADOW
23 getspnam
24 getspent
25 setspent
26 endspent
27 ) ] );
28  
29 1 our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
30  
31 1 our @EXPORT = qw(
32 getspnam
33 getspent
34 setspent
35 endspent
36 );
37  
38 1 our $VERSION = '0.04';
39  
40 sub AUTOLOAD {
41 # This AUTOLOAD is used to 'autoload' constants from the constant()
42 # XS function.
43  
44 1 ▶ my $constname;
Subroutine AUTOLOAD: called CC=3 SCAR=11.1
45 1 our $AUTOLOAD;
46 1 ($constname = $AUTOLOAD) =~ s/.*:://;
47 1 ▶ croak "&Linux::Shadow::constant not defined" if $constname eq 'constant';
Branch: 1 branch
BranchTrueFalseTotal
if $constname eq "constant" 0 1 1
48 1 my ($error, $val) = constant($constname);
49 1 ▶ if ($error) { croak $error; }
Branch: 1 branch
BranchTrueFalseTotal
if ($error) 0 1 1
50 {
51 1 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
52 1 ▶ *$AUTOLOAD = sub { $val };
Subroutine __ANON__: called CC=1 SCAR=0.0
53 }
54 1 goto &$AUTOLOAD;
55 }
56  
57 1 require XSLoader;
58 1 XSLoader::load('Linux::Shadow', $VERSION);
59  
60 # Preloaded methods go here.
61  
62 # Autoload methods go after =cut, and are processed by the autosplit program.
63  
64 1 1;
65 __END__
↑ Summary Shadow.xs »