File Coverage

blib/lib/ExtUtils/Typemaps/Signo.pm
Criterion Covered Total %
statement 9 13 69.2
branch n/a
condition n/a
subroutine 3 4 75.0
pod 1 1 100.0
total 13 18 72.2


line stmt bran cond sub pod time code
1             package ExtUtils::Typemaps::Signo;
2             $ExtUtils::Typemaps::Signo::VERSION = '0.009';
3 2     2   229638 use strict;
  2         5  
  2         93  
4 2     2   14 use warnings;
  2         1423  
  2         165  
5              
6 2     2   17 use parent 'ExtUtils::Typemaps';
  2         5  
  2         18  
7              
8             sub new {
9 0     0 1   my $class = shift;
10 0           my $self = $class->SUPER::new(@_);
11              
12 0           $self->add_string(string => <<'END');
13             TYPEMAP
14             signo_t T_SIGNO
15              
16             INPUT
17             T_SIGNO
18             $var = (SvIOK($arg) || looks_like_number($arg)) ? SvIV($arg) : whichsig(SvPV_nolen($arg));
19             END
20              
21 0           return $self;
22             }
23              
24             1;
25              
26             #ABSTRACT: A typemap for dealing with signal numbers and names
27              
28             __END__