| 1 | package HTTP::Headers::ActionPack::Authorization; | ||||||||||
| 2 | # ABSTRACT: The Authorization Header factory | ||||||||||
| 3 | |||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 2 | our $VERSION = '0.10'; | |||||||||
| 8 | |||||||||||
| 9 | 2 | ▶ | use HTTP::Headers::ActionPack::Authorization::Basic; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 2 | ▶ | use HTTP::Headers::ActionPack::Authorization::Digest; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 8 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 13 | 8 | my $class = shift; | |||||||||
| 14 | 8 | my $type = shift; | |||||||||
| 15 | 8 | ▶ | $type eq 'Basic' | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | ? HTTP::Headers::ActionPack::Authorization::Basic->new( $type, @_ ) | ||||||||||
| 17 | : HTTP::Headers::ActionPack::Authorization::Digest->new( $type, @_ ); | ||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 4 | ▶ | sub new_from_string { | ||||||||
|
Subroutine
new_from_string: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 21 | 4 | my ($class, $header_string) = @_; | |||||||||
| 22 | 4 | ▶ | $header_string =~ /^Basic/ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | ? HTTP::Headers::ActionPack::Authorization::Basic->new_from_string( $header_string ) | ||||||||||
| 24 | : HTTP::Headers::ActionPack::Authorization::Digest->new_from_string( $header_string ); | ||||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 2 | 1; | |||||||||
| 28 | |||||||||||
| 29 | __END__ | ||||||||||