| 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
Condition33%1/3
$services and @$services > 0
MC/DC0%0/2
$services and @$services > 0
$services
@$services > 0
Truth table33%1/3
A and B
A= $servicesB= @$services > 0
| |||||||||||||||||||||||||||||
| 25 | 0 | push @services, @$services; | |||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||
| 27 | 1 | ▶ | return $self->ERROR( sprintf q{No Service Found for %s}, | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 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 | |||||||||||||||||||||||||||||