| 1 | package OpenID::Lite::RelyingParty::Discover; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | with 'OpenID::Lite::Role::ErrorHandler'; | |||||||||||||||||||
| 5 | 1 | with 'OpenID::Lite::Role::Discoverer'; | |||||||||||||||||||
| 6 | 1 | with 'OpenID::Lite::Role::AgentHandler'; | |||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | ▶ | use OpenID::Lite::RelyingParty::Discover::Method::XRI; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | 1 | ▶ | use OpenID::Lite::RelyingParty::Discover::Method::URL; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 0 | ▶ | sub discover { | ||||||||||||||||||
|
Subroutine
discover: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 12 | 0 | my ( $self, $identity ) = @_; | |||||||||||||||||||
| 13 | 0 | my $disco = $self->create_method_for( $identity ); | |||||||||||||||||||
| 14 | 0 | ▶ | return $disco->discover( $identity ) | ||||||||||||||||||
|
Condition0%0/3
$disco->discover($identity) || $self->ERROR($disco->errstr)
MC/DC0%0/2
$disco->discover($identity) || $self->ERROR($disco->errstr)
$disco->discover($identity)
$self->ERROR($disco->errstr)
Truth table0%0/3
A || B
A= $disco->discover($identity)B= $self->ERROR($disco->errstr)
| |||||||||||||||||||||
| 15 | || $self->ERROR( $disco->errstr ); | ||||||||||||||||||||
| 16 | } | ||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | # factory method | ||||||||||||||||||||
| 19 | 0 | ▶ | sub create_method_for { | ||||||||||||||||||
|
Subroutine
create_method_for: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 20 | 0 | my ( $self, $identity ) = @_; | |||||||||||||||||||
| 21 | 0 | ▶ | my $disco | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 22 | = $identity->is_xri | ||||||||||||||||||||
| 23 | ? OpenID::Lite::RelyingParty::Discover::Method::XRI->new( | ||||||||||||||||||||
| 24 | agent => $self->agent ) | ||||||||||||||||||||
| 25 | : OpenID::Lite::RelyingParty::Discover::Method::URL->new( | ||||||||||||||||||||
| 26 | agent => $self->agent ); | ||||||||||||||||||||
| 27 | 0 | return $disco; | |||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 1 | ▶ | no Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 31 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||
| 32 | 1 | 1; | |||||||||||||||||||
| 33 | |||||||||||||||||||||