line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::Headers::ActionPack::Core::BaseAuthHeader; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
5
|
|
|
5
|
|
4377
|
$HTTP::Headers::ActionPack::Core::BaseAuthHeader::AUTHORITY = 'cpan:STEVAN'; |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$HTTP::Headers::ActionPack::Core::BaseAuthHeader::VERSION = '0.09'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
# ABSTRACT: The base Auth Header |
9
|
|
|
|
|
|
|
|
10
|
5
|
|
|
5
|
|
30
|
use strict; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
150
|
|
11
|
5
|
|
|
5
|
|
179
|
use warnings; |
|
5
|
|
|
|
|
10
|
|
|
5
|
|
|
|
|
159
|
|
12
|
|
|
|
|
|
|
|
13
|
5
|
|
|
5
|
|
41
|
use Carp qw[ confess ]; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
305
|
|
14
|
5
|
|
|
|
|
51
|
use HTTP::Headers::ActionPack::Util qw[ |
15
|
|
|
|
|
|
|
join_header_params |
16
|
5
|
|
|
5
|
|
3516
|
]; |
|
5
|
|
|
|
|
16
|
|
17
|
|
|
|
|
|
|
|
18
|
5
|
|
|
5
|
|
2618
|
use parent 'HTTP::Headers::ActionPack::Core::BaseHeaderWithParams'; |
|
5
|
|
|
|
|
12
|
|
|
5
|
|
|
|
|
53
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub BUILDARGS { |
21
|
10
|
|
|
10
|
1
|
19
|
my $class = shift; |
22
|
10
|
|
|
|
|
66
|
my ($type, @params) = @_; |
23
|
|
|
|
|
|
|
|
24
|
10
|
50
|
|
|
|
40
|
confess "You must specify an auth-type" unless $type; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
return +{ |
27
|
10
|
|
|
|
|
76
|
auth_type => $type, |
28
|
10
|
|
|
|
|
18
|
%{ $class->_prepare_params( @params ) } |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub new_from_string { |
33
|
5
|
|
|
5
|
1
|
53
|
my ($class, $header_string) = @_; |
34
|
|
|
|
|
|
|
|
35
|
5
|
|
|
|
|
36
|
my @parts = HTTP::Headers::Util::_split_header_words( $header_string ); |
36
|
5
|
|
|
|
|
790
|
splice @{ $parts[0] }, 1, 1; |
|
5
|
|
|
|
|
19
|
|
37
|
|
|
|
|
|
|
|
38
|
5
|
|
|
|
|
14
|
$class->new( map { @$_ } @parts ); |
|
32
|
|
|
|
|
129
|
|
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
20
|
|
|
20
|
1
|
3572
|
sub auth_type { (shift)->{'auth_type'} } |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub as_string { |
44
|
10
|
|
|
10
|
1
|
26
|
my $self = shift; |
45
|
10
|
|
|
|
|
30
|
$self->auth_type . ' ' . join_header_params( ', ' => $self->params_in_order ); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |