| 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
| |||||||||||
| 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
| |||||||||||
| 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; | |||||||||