File Coverage

lib/POSIX/SigAction.pm
Criterion Covered Total %
statement 16 22 72.7
branch 2 8 25.0
condition 2 2 100.0
subroutine 6 9 66.6
pod 5 5 100.0
total 31 46 67.3


line stmt bran cond sub pod time code
1             # Copyrights 2011-2015 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.01.
5 3     3   1010 use warnings;
  3         5  
  3         96  
6 3     3   10 use strict;
  3         2  
  3         87  
7              
8 3     3   12 no warnings 'redefine', 'prototype'; # during release of distribution
  3         3  
  3         233  
9              
10              
11              
12             sub POSIX::SigAction::new
13 16     16 1 2940 { my $class = shift;
14 16   100     109 bless {HANDLER => $_[0], MASK => $_[1], FLAGS => $_[2] || 0, SAFE => 0},
15             $class;
16             }
17              
18             #---------------------------
19              
20             # We cannot use a "package" statement, because it confuses CPAN: the
21             # namespace is assigned to the perl core distribution.
22 3     3   12 no warnings 'redefine';
  3         3  
  3         479  
23             sub POSIX::SigAction::handler($;$)
24 0 0   0 1 0 { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} }
  0         0  
25              
26             sub POSIX::SigAction::mask($;$)
27 0 0   0 1 0 { $_[0]->{MASK} = $_[1] if @_ > 1; $_[0]->{MASK} }
  0         0  
28              
29             sub POSIX::SigAction::flags($;$)
30 0 0   0 1 0 { $_[0]->{FLAGS} = $_[1] if @_ > 1; $_[0]->{FLAGS} }
  0         0  
31              
32             sub POSIX::SigAction::safe($;$)
33 4 100   4 1 16 { $_[0]->{SAFE} = $_[1] if @_ > 1; $_[0]->{SAFE} }
  4         11  
34              
35             1;