AST/MooseX/_BaseTypes.pm

filter: Statementstmt 72.0% 31 / 43 Branchbran 0.0% 0 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 28.5% 4 / 14 Podpod n/a totaltotal 47.9% 35 / 73 CC 9 SCAR 10.9
CC
9
Cov
53%
__ANON__
3.7
__ANON__
3.7
__ANON__
3.7
CRAP 3.0
« AST/Data/Scan/Impl/Perl5/_BaseTypes.pm ↑ Summary AST/Data/Scan/Impl/Perl5/_Perl5Types.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings FATAL => 'all';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package MarpaX::Languages::IDL::AST::MooseX::_BaseTypes;
5  
6 # ABSTRACT: MooseX-IDL base types mapping
7  
8 1 our $VERSION = '0.007'; # VERSION
9  
10 1 ▶use MooseX::Types -declare => [
Subroutine BEGIN: called CC=1 SCAR=0.0
11 qw/_floatingPtType
12 _nativeFloatingPtType
13 _signedShortInt
14 _signedLongInt
15 _signedLonglongInt
16 _unsignedShortInt
17 _unsignedLongInt
18 _unsignedLonglongInt
19 _charType
20 _wideCharType
21 _stringType
22 _wideStringType
23 _booleanType
24 _octetType
25 _objectType
26 _valueBaseType
27 1 _anyType/];
28 1 ▶use MooseX::Types::Moose qw/Int Str Bool Object Any Num/;
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 1 class_type _floatingPtType, { class => 'Math::BigFloat' };
31 1 subtype _nativeFloatingPtType,as Num;
32 0 ▶subtype _signedShortInt, as Int, where { ($_ >= -2**15) && ($_ <= (2**15 - 1))};
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= -32768 and $_ <= 32767 0 0 0
33 0 ▶subtype _signedLongInt, as Int, where { ($_ >= -2**31) && ($_ <= (2**31 - 1))};
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= "-2147483648" and $_ <= 2147483647 0 0 0
34 0 ▶subtype _signedLonglongInt, as Int, where { ($_ >= -2**63) && ($_ <= (2**63 - 1))};
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= "-9.22337203685478e+18" and $_ <= "9.22337203685478e+18" 0 0 0
35 0 ▶subtype _unsignedShortInt, as Int, where { ($_ >= 0) && ($_ <= (2**16 - 1))};
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 0 and $_ <= 65535 0 0 0
36 0 ▶subtype _unsignedLongInt, as Int, where { ($_ >= 0) && ($_ <= (2**32 - 1))};
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 0 and $_ <= 4294967295 0 0 0
37 0 ▶subtype _unsignedLonglongInt, as Int, where { ($_ >= 0) && ($_ <= (2**64 - 1))};
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 0 and $_ <= "1.84467440737096e+19" 0 0 0
38 0 ▶subtype _charType, as Str, where { length($_) == 1 && ord(substr($_, 0, 1)) <= 255 };
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
length $_ == 1 and ord substr($_, 0, 1) <= 255 0 0 0
39 0 ▶subtype _wideCharType, as Str, where { length($_) == 1 };
Subroutine __ANON__: not called CC=1 SCAR=1.2
40 0 ▶subtype _stringType, as Str, where { my $str = $_; ! grep {ord(substr($str, $_, 1)) > 255} (0..length($_)) };
Subroutine __ANON__: not called CC=1 SCAR=3.5
41 1 subtype _wideStringType, as Str;
42 1 subtype _booleanType, as Bool;
43 0 ▶subtype _octetType, as Int, where { $_ >= 0 && $_ <= 255 };
Subroutine __ANON__: not called CC=2 SCAR=13.0
Branch: 1 branch
BranchTrueFalseTotal
$_ >= 0 and $_ <= 255 0 0 0
44 1 subtype _objectType, as Object;
45 1 subtype _valueBaseType, as Object;
46 1 subtype _anyType, as Any;
47  
48 1 1;
49  
50 __END__
« AST/Data/Scan/Impl/Perl5/_BaseTypes.pm ↑ Summary AST/Data/Scan/Impl/Perl5/_Perl5Types.pm »