Lite/RelyingParty/Discover/Method/XRI.pm

filter: Statementstmt 87.8% 29 / 33 Branchbran 50.0% 2 / 4 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 87.5% 7 / 8 Podpod n/a totaltotal 78.0% 39 / 50 CC 5 SCAR 12.3
CC
5
Cov
80%
__ANON__
6.6
__ANON__
2.0
BEGIN
1.0
CRAP 3.4
« Lite/RelyingParty/Discover.pm ↑ Summary Lite/Nonce.pm »
1 package OpenID::Lite::RelyingParty::Discover::Method::XRI;
2 2 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 extends 'OpenID::Lite::RelyingParty::Discover::Method::Base';
4  
5 2 ▶use OpenID::Lite::RelyingParty::Discover::Fetcher::XRI;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use OpenID::Lite::RelyingParty::Discover::Parser::XRI;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 2 ▶use OpenID::Lite::Constants::Namespace qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
9 SERVER_2_0
10 SIGNON_2_0
11 SIGNON_1_1
12 SIGNON_1_0
13 2 );
14  
15 1 ▶override 'discover' => sub {
Subroutine __ANON__: called CC=5 SCAR=18.9
16 1 my ( $self, $identifier ) = @_;
17 1 my @services;
18 1 for
19 my $service_type ( SERVER_2_0, SIGNON_2_0, SIGNON_1_1, SIGNON_1_0 )
20 {
21 4 my $services
22 = super( $identifier, { service_type => $service_type } );
23 next
24 4 ▶ unless ($services && @$services > 0);
Branch: 1 branch
BranchTrueFalseTotal
unless $services and @$services > 0 4 0 4
Condition33%1/3
$services and @$services > 0
!ll&&!rl&&r
400
MC/DC0%0/2
$services and @$services > 0
$services @$services > 0
Truth table33%1/3
A and B
A= $servicesB= @$services > 0
ABresult
0X0
100
111
25 0 push @services, @$services;
26 }
27 1 ▶ return $self->ERROR( sprintf q{No Service Found for %s},
Branch: 1 branch
BranchTrueFalseTotal
unless @services > 0 1 0 1
28 $identifier->as_string )
29 unless @services > 0;
30 0 return \@services;
31 2 };
32  
33 1 ▶override '_build__fetcher' => sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
34 1 my $self = shift;
35 1 return OpenID::Lite::RelyingParty::Discover::Fetcher::XRI->new(
36 agent => $self->agent );
37 2 };
38  
39 0 ▶override '_build__parser' => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
40 0 my $self = shift;
41 0 return OpenID::Lite::RelyingParty::Discover::Parser::XRI->new;
42 2 };
43  
44 2 ▶no Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 2 __PACKAGE__->meta->make_immutable;
46 2 1;
47  
« Lite/RelyingParty/Discover.pm ↑ Summary Lite/Nonce.pm »