SAML2/Types.pm

filter: Statementstmt 100% 27 / 27 Branchbran 83.3% 5 / 6 Conditioncond 50.0% 1 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 100% 9 / 9 Podpod n/a totaltotal 93.3% 42 / 45 CC 5 SCAR 9.5
CC
5
Cov
94%
__ANON__
5.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.6
« SAML2/Binding/POST.pm ↑ Summary SAML2/AttributeConsumingService.pm »
1 package Net::SAML2::Types;
2 33 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 33 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 33 our $VERSION = '0.89'; # VERSION
6  
7 # ABSTRACT: Custom Moose types for Net::SAML2
8  
9 33 ▶use Types::Serialiser;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 33 ▶use MooseX::Types -declare => [
Subroutine BEGIN: called CC=1 SCAR=0.0
11 qw(
12 XsdID
13 SAMLRequestType
14 signingAlgorithm
15 )
16 33 ];
17  
18 33 ▶use MooseX::Types::Moose qw(Str Int Num Bool ArrayRef HashRef Item);
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20  
21 subtype XsdID, as Str,
22 181 ▶ where {
Subroutine __ANON__: called CC=5 SCAR=16.3
23 181 ▶ return 0 unless length($_ // '');
Branch: 1 branch
BranchTrueFalseTotal
unless length($_ // "") 0 181 181
Condition50%1/2
$_ // ""
l!l
1810
MC/DC0%0/1
$_ // ""
$_
Truth table50%1/2
A
A= $_
Aresult
11
00
24 181 ▶ return 0 unless $_ =~ /^[a-zA-Z_]/;
Branch: 1 branch
BranchTrueFalseTotal
unless $_ =~ /^[a-zA-Z_]/ 1 180 181
25 180 ▶ return 0 if $_ =~ /[^a-zA-Z0-9_\.\-]/;
Branch: 1 branch
BranchTrueFalseTotal
if $_ =~ /[^a-zA-Z0-9_\.\-]/ 1 179 180
26 179 return 1;
27 },
28 1 ▶ message { "'$_' is not a valid xsd:ID" };
Subroutine __ANON__: called CC=1 SCAR=0.0
29  
30  
31 subtype SAMLRequestType, as enum(
32 [
33 qw(SAMLRequest SAMLResponse)
34 ]
35 ),
36 1 ▶ message { "'$_' is not a SAML Request type" };
Subroutine __ANON__: called CC=1 SCAR=0.0
37  
38  
39  
40 subtype signingAlgorithm, as enum(
41 [
42 qw(sha244 sha256 sha384 sha512 sha1)
43 ]
44 ),
45 1 ▶ message { "'$_' is not a supported signingAlgorithm" };
Subroutine __ANON__: called CC=1 SCAR=0.0
46  
47 33 1;
48  
49 __END__
« SAML2/Binding/POST.pm ↑ Summary SAML2/AttributeConsumingService.pm »