| 1 | package Mojo::UserAgent::DigestAuth; | ||||||||||
| 2 | 1 | ▶ | use Mojo::Base qw(Exporter); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | ▶ | use Mojo::UserAgent; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Mojo::Util qw(deprecated md5_sum); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | our $VERSION = '0.06'; | |||||||||
| 8 | 1 | our @EXPORT = qw( $_request_with_digest_auth ); | |||||||||
| 9 | |||||||||||
| 10 | 2 | ▶ | our $_request_with_digest_auth = sub { | ||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.0
| |||||||||||
| 11 | 2 | deprecated q[$_request_with_digest_auth() is DEPRECATED in favor of $ua->with_roles('+DigestAuth')->$method(...)]; | |||||||||
| 12 | 2 | ▶ | my @cb = ref $_[-1] eq 'CODE' ? (pop) : (); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 2 | my ($ua, $method) = (shift, uc shift); | |||||||||
| 14 | 2 | ▶ | $ua = $ua->with_roles('+DigestAuth') unless $ua->DOES('Mojo::UserAgent::Role::DigestAuth'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 2 | return $ua->start($ua->build_tx($method, @_), @cb); | |||||||||
| 16 | 1 | }; | |||||||||
| 17 | |||||||||||
| 18 | 1 | 1; | |||||||||
| 19 | |||||||||||
| 20 | =encoding utf8 | ||||||||||
| 21 | |||||||||||
| 22 | =head1 NAME | ||||||||||
| 23 | |||||||||||
| 24 | Mojo::UserAgent::DigestAuth - Allow Mojo::UserAgent to execute digest auth requests | ||||||||||
| 25 | |||||||||||
| 26 | =head1 VERSION | ||||||||||
| 27 | |||||||||||
| 28 | 0.06 | ||||||||||
| 29 | |||||||||||
| 30 | =head1 DESCRIPTION | ||||||||||
| 31 | |||||||||||
| 32 | L<Mojo::UserAgent::DigestAuth> is DEPRECATED in favor of L<Mojo::UserAgent::Role::DigestAuth>. | ||||||||||
| 33 | |||||||||||
| 34 | =head1 SYNOPSIS | ||||||||||
| 35 | |||||||||||
| 36 | See L<Mojo::UserAgent::Role::DigestAuth>. | ||||||||||
| 37 | |||||||||||
| 38 | =head1 SEE ALSO | ||||||||||
| 39 | |||||||||||
| 40 | L<Mojo::UserAgent::Role::DigestAuth>. | ||||||||||
| 41 | |||||||||||
| 42 | =cut | ||||||||||