File Coverage

blib/lib/ExtUtils/XSpp/Typemap/simple.pm
Criterion Covered Total %
statement 15 16 93.7
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 4 5 80.0
total 26 29 89.6


line stmt bran cond sub pod time code
1             package ExtUtils::XSpp::Typemap::simple;
2              
3 21     21   111 use base 'ExtUtils::XSpp::Typemap';
  21         30  
  21         588  
4              
5             sub init {
6 2876     2876 0 2788 my $this = shift;
7 2876         3592 my %args = @_;
8              
9 2876 50       4035 if( my $base = $args{base} ) {
10             %args = ( xs_type => $base->{XS_TYPE},
11             xs_input_code => $base->{XS_INPUT_CODE},
12             xs_output_code => $base->{XS_OUTPUT_CODE},
13 0         0 %args );
14             }
15              
16 2876         3542 $this->{TYPE} = $args{type};
17 2876         3252 $this->{NAME} = $args{name};
18 2876         3015 $this->{XS_TYPE} = $args{xs_type};
19 2876         3129 $this->{XS_INPUT_CODE} = $args{xs_input_code};
20 2876         4182 $this->{XS_OUTPUT_CODE} = $args{xs_output_code};
21             }
22              
23 227     227 1 589 sub cpp_type { $_[0]->{TYPE}->print }
24 69     69 1 182 sub output_code { undef } # likewise
25 106     106 1 189 sub call_parameter_code { undef }
26 60     60 1 184 sub call_function_code { undef }
27              
28             1;