Lite/RelyingParty/Discover/Parser/Yadis.pm

filter: Statementstmt 73.0% 19 / 26 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 71.4% 5 / 7 Podpod 0.0% 0 / 2 totaltotal 61.5% 24 / 39 CC 3 SCAR 11.7
CC
3
Cov
63%
parse
6.0
create_parser_for
6.0
BEGIN
1.0
CRAP 3.2
« Lite/Nonce.pm ↑ Summary Lite/RelyingParty/CheckID/Result.pm »
1 package OpenID::Lite::RelyingParty::Discover::Parser::Yadis;
2  
3 2 ▶use Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use OpenID::Lite::Constants::Yadis qw(XRDS_CONTENT_TYPE);
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 with 'OpenID::Lite::Role::ErrorHandler';
7 2 with 'OpenID::Lite::Role::Parser';
8  
9 2 ▶use OpenID::Lite::RelyingParty::Discover::Parser::XRDS;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 2 ▶use OpenID::Lite::RelyingParty::Discover::Parser::HTML;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub parse {
Subroutine parse: not called CC=2 SCAR=17.9
Pod undocumented
13 0 my ( $self, $result ) = @_;
14 0 my $parser = $self->create_parser_for( $result );
15 0 ▶ my $service = $parser->parse( $result )
Branch: 1 branch
BranchTrueFalseTotal
my $service = $parser->parse($result) or return $self->ERROR($parser->errstr) 0 0 0
16 or return $self->ERROR( $parser->errstr );
17 0 return $service;
18 }
19  
20 0 ▶sub create_parser_for {
Subroutine create_parser_for: not called CC=2 SCAR=17.9
Pod undocumented
21 0 my ( $self, $result ) = @_;
22 0 my $xrds_regex = quotemeta XRDS_CONTENT_TYPE;
23 0 ▶ my $parser
Branch: 1 branch
BranchTrueFalseTotal
$result->content_type =~ /^$xrds_regex/i ? : 0 0 0
24 = ( $result->content_type =~ /^$xrds_regex/i )
25 ? OpenID::Lite::RelyingParty::Discover::Parser::XRDS->new
26 : OpenID::Lite::RelyingParty::Discover::Parser::HTML->new;
27 }
28  
29 2 ▶no Any::Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 2 __PACKAGE__->meta->make_immutable;
31 2 1;
« Lite/Nonce.pm ↑ Summary Lite/RelyingParty/CheckID/Result.pm »