| 1 | package OpenID::Lite::RelyingParty::Discover::Fetcher::HTML; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use Any::Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | with 'OpenID::Lite::Role::AgentHandler'; | |||||||||
| 5 | 2 | with 'OpenID::Lite::Role::ErrorHandler'; | |||||||||
| 6 | |||||||||||
| 7 | 2 | ▶ | use OpenID::Lite::RelyingParty::Discover::FetchResult; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 0 | ▶ | sub fetch { | ||||||||
|
Subroutine
fetch: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 10 | 0 | my ( $self, $uri ) = @_; | |||||||||
| 11 | |||||||||||
| 12 | 0 | my $res = $self->agent->get($uri); | |||||||||
| 13 | 0 | ▶ | return $self->ERROR( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | sprintf q{Failed to HTML based discovery for url "%s"}, $uri ) | ||||||||||
| 15 | unless $res->is_success; | ||||||||||
| 16 | |||||||||||
| 17 | 0 | my $result = OpenID::Lite::RelyingParty::Discover::FetchResult->new; | |||||||||
| 18 | 0 | $result->final_url( $res->base->as_string ); | |||||||||
| 19 | 0 | $result->normalized_identifier( $uri ); | |||||||||
| 20 | 0 | $result->content_type( lc $res->header('Content-Type') ); | |||||||||
| 21 | 0 | $result->content( $res->content ); | |||||||||
| 22 | |||||||||||
| 23 | 0 | return $result; | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 2 | ▶ | no Any::Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | 2 | __PACKAGE__->meta->make_immutable; | |||||||||
| 28 | 2 | 1; | |||||||||
| 29 | |||||||||||