Lang/Raw.pm

filter: Statementstmt 100% 19 / 19 Branchbran 100% 2 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 100% 26 / 26 CC 2 SCAR 3.4
CC
2
Cov
100%
native_type_map
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.4
« Legacy/Raw.pm ↑ Summary Legacy/Raw/Ptr.pm »
1 package FFI::Platypus::Lang::Raw;
2  
3 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 8 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 8 ▶use base qw( FFI::Platypus::Lang::C );
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Types for use with FFI::Platypus::Legacy::Raw
8 8 our $VERSION = '0.06'; # VERSION
9  
10  
11 8 my %types;
12 sub native_type_map
13 33 ▶{
Subroutine native_type_map: called CC=2 SCAR=6.9
Pod documented
14 33 my $class = shift;
15 33 ▶ unless(%types)
Branch: 1 branch
BranchTrueFalseTotal
unless (%types) 8 25 33
16 {
17 %types = (
18 8 %{ $class->SUPER::native_type_map },
19 'v' => 'void',
20 'x' => 'sint64',
21 'X' => 'uint64',
22 'i' => 'sint32',
23 'I' => 'uint32',
24 'z' => 'sint16',
25 'Z' => 'uint16',
26 'c' => 'sint8',
27 'C' => 'uint8',
28 'f' => 'float',
29 'd' => 'double',
30 's' => 'string',
31 );
32 }
33 33 $types{l} = $types{'long'};
34 33 $types{L} = $types{'unsigned long'};
35 33 \%types;
36 }
37  
38 8 1;
39  
40 __END__
« Legacy/Raw.pm ↑ Summary Legacy/Raw/Ptr.pm »