Lite/RelyingParty/Discover/Method/URL.pm

filter: Statementstmt 69.2% 18 / 26 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 0.0% 0 / 1 totaltotal 62.8% 22 / 35 CC 3 SCAR 16.6
CC
3
Cov
64%
discover
12.0
_build__methods
2.0
BEGIN
1.0
CRAP 5.2
« Lite/RelyingParty/Discover/Fetcher/Yadis.pm ↑ Summary Lite/Types.pm »
1 package OpenID::Lite::RelyingParty::Discover::Method::URL;
2  
3 1 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 1 ▶use OpenID::Lite::RelyingParty::Discover::Method::Yadis;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use OpenID::Lite::RelyingParty::Discover::Method::HTML;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 has '_methods' => (
9 is => 'ro',
10 isa => 'ArrayRef', # OpenID::Lite::RelyingParty::Discoverable composit
11 lazy_build => 1,
12 );
13  
14 1 with 'OpenID::Lite::Role::Discoverer';
15 1 with 'OpenID::Lite::Role::ErrorHandler';
16 1 with 'OpenID::Lite::Role::AgentHandler';
17  
18 0 ▶sub discover {
Subroutine discover: not called CC=3 SCAR=24.8
Pod undocumented
19 0 my ( $self, $identifier ) = @_;
20  
21 # chain of responsibility
22 0 my $methods = $self->_methods;
23 0 for my $method (@$methods) {
24 0 my $services = $method->discover($identifier);
25 0 ▶ return $services if $services;
Branch: 1 branch
BranchTrueFalseTotal
if $services 0 0 0
26 }
27  
28 0 return $self->ERROR(
29 sprintf q{Failed Yadis and HTML discovery for identifier "%s"},
30 $identifier );
31 }
32  
33 0 ▶sub _build__methods {
Subroutine _build__methods: not called CC=1 SCAR=6.9
34 0 my $self = shift;
35 0 [ OpenID::Lite::RelyingParty::Discover::Method::Yadis->new(
36 agent => $self->agent
37 ),
38 OpenID::Lite::RelyingParty::Discover::Method::HTML->new(
39 agent => $self->agent
40 ),
41 ];
42 }
43  
44 1 ▶no Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
45 1 __PACKAGE__->meta->make_immutable;
46 1 1;
« Lite/RelyingParty/Discover/Fetcher/Yadis.pm ↑ Summary Lite/Types.pm »