| 1 | package HTTP::Headers::ActionPack::Core::BaseHeaderType; | ||||||||||
| 2 | # ABSTRACT: A Base header type | ||||||||||
| 3 | |||||||||||
| 4 | 10 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 10 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 10 | our $VERSION = '0.10'; | |||||||||
| 8 | |||||||||||
| 9 | 10 | ▶ | use Carp qw[ confess ]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 10 | ▶ | use HTTP::Headers::ActionPack::Util qw[ | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | split_header_words | ||||||||||
| 13 | join_header_words | ||||||||||
| 14 | 10 | ]; | |||||||||
| 15 | |||||||||||
| 16 | 10 | ▶ | use parent 'HTTP::Headers::ActionPack::Core::BaseHeaderWithParams'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | 192 | ▶ | sub BUILDARGS { | ||||||||
|
Subroutine
BUILDARGS: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||
| 19 | 192 | my $class = shift; | |||||||||
| 20 | 192 | my ($subject, @params) = @_; | |||||||||
| 21 | |||||||||||
| 22 | 192 | ▶ | confess "You must specify a subject" unless $subject; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | return +{ | ||||||||||
| 25 | subject => $subject, | ||||||||||
| 26 | 192 | %{ $class->_prepare_params( @params ) } | |||||||||
| 27 | }; | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 859 | ▶ | sub subject { (shift)->{'subject'} } | ||||||||
|
Subroutine
subject: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 31 | |||||||||||
| 32 | 78 | ▶ | sub new_from_string { | ||||||||
|
Subroutine
new_from_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 33 | 78 | my ($class, $header_string) = @_; | |||||||||
| 34 | 78 | $class->new( @{ (split_header_words( $header_string ))[0] } ); | |||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 242 | ▶ | sub as_string { | ||||||||
|
Subroutine
as_string: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 38 | 242 | my $self = shift; | |||||||||
| 39 | 242 | join_header_words( $self->subject, $self->params_in_order ); | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 10 | 1; | |||||||||
| 43 | |||||||||||
| 44 | __END__ | ||||||||||