blib/lib/POSIX/1003/Proc.pm

filter: Statementstmt 75.0% 33 / 44 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 35.2% 6 / 17 Podpod 88.8% 8 / 9 totaltotal 67.1% 47 / 70 CC 1 SCAR 4.7
CC
1
Cov
75%
cuserid
2.0
ctermid
2.0
_exit
2.0
CRAP 1.6
« blib/lib/POSIX/1003/Signals.pm ↑ Summary blib/lib/POSIX/1003/Locale.pm »
1 # Copyrights 2011-2020 by [Mark Overmeer].
2 # For other contributors see ChangeLog.
3 # See the manual pages for details on the licensing terms.
4 # Pod stripped from pm file by OODoc 2.02.
5 # This code is part of distribution POSIX-1003. Meta-POD processed with
6 # OODoc into POD and HTML manual-pages. See README.md
7 # Copyright Mark Overmeer. Licensed under the same terms as Perl itself.
8  
9 package POSIX::1003::Proc;
10 5 ▶use vars '$VERSION';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 5 $VERSION = '1.02';
12  
13 5 ▶use base 'POSIX::1003::Module';
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 5 my @constants;
19 5 my @functions = qw/
20 abort
21  
22 WEXITSTATUS WIFEXITED WIFSIGNALED WIFSTOPPED
23 WSTOPSIG WTERMSIG
24  
25 getpid getppid
26 _exit pause setpgid setsid tcgetpgrp tcsetpgrp
27 ctermid cuserid getcwd nice
28 /;
29  
30 5 our @IN_CORE = qw/wait waitpid/;
31 5 push @functions, @IN_CORE;
32  
33 5 our %EXPORT_TAGS =
34 ( constants => \@constants
35 , functions => \@functions
36 , tables => [ '%proc' ]
37 );
38  
39 5 my $proc;
40 5 our %proc;
41  
42 5 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
43 5 $proc = proc_table;
44 5 push @constants, keys %$proc;
45 5 tie %proc, 'POSIX::1003::ReadOnlyTable', $proc;
46 }
47  
48  
49 # When the next where automatically imported from POSIX, they are
50 # considered constant and therefore without parameter. Therefore,
51 # these are linked explicitly.
52 5 *WIFEXITED = \&POSIX::WIFEXITED;
53 5 *WIFSIGNALED = \&POSIX::WIFSIGNALED;
54 5 *WIFSTOPPED = \&POSIX::WIFSTOPPED;
55 5 *WEXITSTATUS = \&POSIX::WEXITSTATUS;
56 5 *WTERMSIG = \&POSIX::WTERMSIG;
57 5 *WSTOPSIG = \&POSIX::WSTOPSIG;
58  
59 #-------------------------------------
60  
61 0 ▶sub cuserid() {goto &POSIX::cuserid}
Subroutine cuserid: not called CC=1 SCAR=6.9
Pod documented
62 0 ▶sub ctermid() {goto &POSIX::ctermid}
Subroutine ctermid: not called CC=1 SCAR=6.9
Pod documented
63 0 ▶sub _exit($) {goto &POSIX::_exit}
Subroutine _exit: not called CC=1 SCAR=6.9
64 0 ▶sub pause() {goto &POSIX::pause}
Subroutine pause: not called CC=1 SCAR=6.9
Pod documented
65 0 ▶sub setpgid($$) {goto &POSIX::setpgid}
Subroutine setpgid: not called CC=1 SCAR=6.9
Pod documented
66 0 ▶sub setsid() {goto &POSIX::setsid}
Subroutine setsid: not called CC=1 SCAR=6.9
Pod documented
67 0 ▶sub cgetpgrp($) {goto &POSIX::cgetpgrp}
Subroutine cgetpgrp: not called CC=1 SCAR=6.9
Pod undocumented
68 0 ▶sub tcsetpgrp($$) {goto &POSIX::tcsetpgrp}
Subroutine tcsetpgrp: not called CC=1 SCAR=6.9
Pod documented
69  
70 # getpid and getppid implemented in XS
71  
72 0 ▶sub nice($) {goto &POSIX::nice}
Subroutine nice: not called CC=1 SCAR=6.9
Pod documented
73  
74  
75 0 ▶sub times5() {goto &POSIX::times}
Subroutine times5: not called CC=1 SCAR=6.9
Pod documented
76  
77  
78 sub _create_constant($)
79 7 ▶{ my ($class, $name) = @_;
Subroutine _create_constant: called CC=1 SCAR=0.2
80 7 my $val = $proc->{$name};
81 0 ▶ sub() {$val};
Subroutine __ANON__: not called CC=1 SCAR=1.2
82 }
83  
84 5 1;
« blib/lib/POSIX/1003/Signals.pm ↑ Summary blib/lib/POSIX/1003/Locale.pm »