lib/Module/Generic/HeaderValue.pm

filter: Statementstmt 88.7% 220 / 248 Branchbran 64.0% 82 / 128 Conditioncond 46.0% 58 / 126 MC/DCmcdc 15.4% 11 / 71 Subroutinesub 94.1% 32 / 34 Podpod 82.6% 19 / 23 totaltotal 66.9% 422 / 630 CC 118 SCAR 39.7
CC
118
Cov
72%
new_from_header
147.4
as_string
50.6
value_as_string
19.9
CRAP 52.9
« lib/Module/Generic/Scalar/IO.pm ↑ Summary lib/Module/Generic/File/Magic.pm »
1 ##----------------------------------------------------------------------------
2 ## Module Generic - ~/lib/Module/Generic/HeaderValue.pm
3 ## Version v0.4.4
4 ## Copyright(c) 2026 DEGUEST Pte. Ltd.
5 ## Author: Jacques Deguest <jack@deguest.jp>
6 ## Created 2021/11/03
7 ## Modified 2026/03/10
8 ## All rights reserved
9 ##
10 ## This program is free software; you can redistribute it and/or modify it
11 ## under the same terms as Perl itself.
12 ##----------------------------------------------------------------------------
13 package Module::Generic::HeaderValue;
14 BEGIN
15 4 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
16 4 ▶ use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 4 ▶ use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 4 warnings::register_categories( 'Module::Generic' );
19 4 ▶ use parent qw( Module::Generic );
Subroutine BEGIN: called CC=1 SCAR=0.0
20 4 ▶ use vars qw( $QUOTE_REGEXP $DELIMITER $DELIMITERS $VCHAR $VCHAR_WITHOUT_DELIM
Subroutine BEGIN: called CC=1 SCAR=0.0
21 4 $TOKEN_REGEXP $TEXT_REGEXP );
22 4 ▶ use overload (
Subroutine BEGIN: called CC=1 SCAR=0.2
23 '""' => 'as_string',
24 0 ▶ bool => sub{ return( $_[0] ) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 4 fallback => 1,
26 4 );
27 4 ▶ use URI::Escape;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 4 our $QUOTE_REGEXP = qr/([\\"])/;
29 #
30 # RegExp to match type in rfc7231 section 3.1.1.1
31 # <https://datatracker.ietf.org/doc/html/rfc7231#page-8>
32 # rfc2616, section 2.2
33 # <https://datatracker.ietf.org/doc/html/rfc2616#section-2.2>
34 #
35 # media-type = type "/" subtype
36 # type = token
37 # subtype = token
38 # e.g.: text/html; charset="utf-8"
39 #
40 # rfc6265 <https://datatracker.ietf.org/doc/html/rfc6265#page-8>
41 # token = cookie-octet
42 #
43 # token syntax
44 # rfc2616 <https://datatracker.ietf.org/doc/html/rfc2616#section-2.2>
45 4 our $DELIMITER = qr/["\(\),\/:;<=>\?\@\[\]{}]/;
46 4 our $DELIMITERS = qr/["\(\),\/:;<=>\?\@\[\]{}]+/;
47 # Visible ASCII, i.e. 32 to 126
48 4 our $VCHAR = qr/[\032-\126]+/;
49 4 our $VCHAR_WITHOUT_DELIM = q/\!\#\$\%\&\'\*\+\-\.\^_\`\|\~A-Za-z0-9/;
50 # rfc7230 <https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.6>
51 # TOKEN_REGEXP =
52 # "!" / "#" / "$" / "%" / "&" / "'" / "*"
53 # / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
54 # / DIGIT / ALPHA
55 # ; any VCHAR, except delimiters
56 # our $TOKEN_REGEXP = qr/[^[:cntrl:]()<>\@,;:\\"\/\[\]\?\=\{\}[:blank:]\h]+/;
57 # More explicit version from the previous and also based on rfc7230, section 3.2.6
58 4 our $TOKEN_REGEXP = qr/[${VCHAR_WITHOUT_DELIM}]+/;
59 # "<any OCTET except CTLs, but including LWS>"
60 # <https://datatracker.ietf.org/doc/html/rfc2616#section-2.2>
61 4 our $TEXT_REGEXP = qr/(?>[[:blank:]\h]|[^[:cntrl:]\"])*+/;
62  
63 # \x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E
64 # our $COOKIE_DATA_RE = qr/[^[:cntrl][:blank:]\h\"\,\;\\]+/;
65 # our $COOKIE_DATA_RE = qr/[^[:cntrl:]\"\;\\]+/;
66 # our $TYPE_REGEXP = qr/(?:[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+)|$TOKEN_REGEXP/;
67 # our $TOKEN_REGEXP = qr/[!#$%&'*+.^_`|~0-9A-Za-z-]+/;
68 # our $TEXT_REGEXP = qr/[\u000b\u0020-\u007e\u0080-\u00ff]+|$COOKIE_DATA_RE/;
69 4 our $VERSION = 'v0.4.4';
70 };
71  
72 4 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
73  
74 sub init
75 14 ▶{
Subroutine init: called CC=9 SCAR=22.0
Pod documented
76 14 my $self = shift( @_ );
77 14 my $value = shift( @_ );
78 4 ▶ no overloading;
Subroutine BEGIN: called CC=1 SCAR=0.0
79 14 ▶ return( $self->error( "No value provided." ) ) if( !defined( $value ) || !length( $value ) );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $value and length $value 0 14 14
Condition33%1/3
defined $value and length $value
!ll&&!rl&&r
0014
MC/DC0%0/2
defined $value and length $value
defined $value length $value
Truth table33%1/3
A and B
A= defined $valueB= length $value
ABresult
0X0
100
111
80 14 ▶ $value = [split( /[[:blank:]\h]*\=[[:blank:]\h]*/, $value, 2 )] if( !$self->_is_array( $value ) && index( $value, '=' ) != -1 );
Branch: 1 branch
BranchTrueFalseTotal
if not $self->_is_array($value) and index($value, "=") != -1 4 10 14
Condition100%3/3
not $self->_is_array($value) and index($value, "=") != -1
!ll&&!rl&&r
644
MC/DC100%2/2
not $self->_is_array($value) and index($value, "=") != -1
not $self->_is_array($value) index($value, "=") != -1
Truth table100%3/3
not(A) and B
A= not $self->_is_array($value)B= index($value, "=") != -1
ABresult
0X0
100
111
81 14 $self->{original} = '';
82 14 ▶ $self->{value} = $self->_is_array( $value ) ? $value : [ $value ];
Branch: 1 branch
BranchTrueFalseTotal
$self->_is_array($value) ? : 10 4 14
83 14 $self->{decode} = 0;
84 14 $self->{encode} = 0;
85 14 $self->{params} = {};
86 14 $self->{token_max} = 0;
87 14 $self->{value_max} = 0;
88 14 $self->{_init_strict_use_sub} = 1;
89 14 ▶ $self->SUPER::init( @_ ) || return( $self->pass_error );
Branch: 1 branch
BranchTrueFalseTotal
$self->SUPER::init(@_) or return $self->pass_error 14 0 14
90 4 ▶ use overloading;
Subroutine BEGIN: called CC=1 SCAR=0.0
91 14 ▶ if( scalar( @{$self->{value}} ) > 1 && $self->decode )
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @{$self->{"value"};} > 1 and $self->decode) 1 13 14
Condition100%3/3
scalar @{$self->{"value"};} > 1 and $self->decode
!ll&&!rl&&r
491
MC/DC100%2/2
scalar @{$self->{"value"};} > 1 and $self->decode
scalar @{$self->{"value"};} > 1 $self->decode
Truth table100%3/3
A and B
A= scalar @{$self->{"value"};} > 1B= $self->decode
ABresult
0X0
100
111
92 {
93 1 $self->{value}->[1] = URI::Escape::uri_unescape( $self->{value}->[1] );
94 }
95 14 return( $self );
96 }
97  
98 sub new_from_multi
99 7 ▶{
Subroutine new_from_multi: called CC=11 SCAR=25.5
Pod documented
100 7 my $self = shift( @_ );
101 7 my $s = shift( @_ );
102 7 ▶ return( $self->error( 'Header value is required' ) ) if( !defined( $s ) || !length( $s ) );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $s and length $s 0 7 7
Condition33%1/3
defined $s and length $s
!ll&&!rl&&r
007
MC/DC0%0/2
defined $s and length $s
defined $s length $s
Truth table33%1/3
A and B
A= defined $sB= length $s
ABresult
0X0
100
111
103 7 my $opts = $self->_get_args_as_hash( @_ );
104 7 ▶ $opts->{debug} //= 0;
Condition50%1/2
$opts->{"debug"} //= 0
l!l
70
MC/DC0%0/1
$opts->{"debug"} //= 0
$opts->{"debug"}
Truth table50%1/2
A
A= $opts->{"debug"}
Aresult
11
00
105 7 ▶ $opts->{decode} //= 0;
Condition50%1/2
$opts->{"decode"} //= 0
l!l
07
MC/DC0%0/1
$opts->{"decode"} //= 0
$opts->{"decode"}
Truth table50%1/2
A
A= $opts->{"decode"}
Aresult
11
00
106 7 ▶ my $me = bless( $opts => ( ref( $self ) || $self ) );
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
070
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
107 7 my $parts = [];
108 7 my $i = 0;
109 7 ▶ if( $self->_is_array( $s ) )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_is_array($s)) { } 0 7 7
110 {
111 0 $parts = $s;
112 }
113 else
114 {
115 # split by comma, but avoid comma that would be part of an attribute value, such
116 # as in cookie's expires value: foo=val; Expires=Mon, 01 Nov 2021 08:12:10 GMT, bar=baz; Max-Age=3600
117 # would be 2 cookies:
118 # foo=val; Expires=Mon, 01 Nov 2021 08:12:10 GMT
119 # bar=baz; Max-Age=3600
120 # Here, the regexp part (\\.) is on purpose so that the separator can be captured when
121 # it is undef, which signals to us this is a new part
122 7 foreach( split( /(\\.)|\,[[:blank:]]*(?=(?:[^\s\;\=]+(?:\=|\;|\,|\z)))/, $s ) )
123 {
124 9 ▶ defined( $_ ) ? do{ $parts->[$i] .= $_ } : do{ $i++ };
Branch: 1 branch
BranchTrueFalseTotal
defined $_ ? : 8 1 9
125 }
126 }
127 7 my $res = $self->new_array;
128 7 ▶ for( my $j = 0; $j < scalar( @$parts ); $j++ )
Branch: 1 branch
BranchTrueFalseTotal
if ($j < scalar @$parts) 8 7 15
129 {
130 8 my $o = $me->new_from_header( $parts->[$j] );
131 8 ▶ return( $self->pass_error( $me->error ) ) if( !defined( $o ) );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $o 0 8 8
132 8 $res->push( $o );
133 }
134 7 return( $res );
135 }
136  
137 sub new_from_header
138 8 ▶{
Subroutine new_from_header: called CC=41 SCAR=49.9
Pod documented
139 8 my $self = shift( @_ );
140 8 my $s = shift( @_ );
141 8 ▶ $s =~ s/\015?\012$//gs if( index( $s, "\012" ) != -1 );
Branch: 1 branch
BranchTrueFalseTotal
if (index($s, "\n") != -1) 0 8 8
142 8 ▶ return( $self->error( 'Header value is required' ) ) if( !defined( $s ) || !length( $s ) );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $s and length $s 0 8 8
Condition33%1/3
defined $s and length $s
!ll&&!rl&&r
008
MC/DC0%0/2
defined $s and length $s
defined $s length $s
Truth table33%1/3
A and B
A= defined $sB= length $s
ABresult
0X0
100
111
143 8 my $opts = $self->_get_args_as_hash( @_ );
144 8 ▶ $opts->{debug} //= $self->debug || 0;
Condition50%2/4
$opts->{"debug"} //= $self->debug || 0
l!l
08
$self->debug || 0
l!l
08
MC/DC0%0/1
$opts->{"debug"} //= $self->debug || 0
$opts->{"debug"}
Truth table50%1/2
A
A= $opts->{"debug"}
Aresult
11
00
145 8 ▶ $opts->{decode} //= $self->decode || 0;
Condition50%2/4
$opts->{"decode"} //= $self->decode || 0
l!l
08
$self->decode || 0
l!l
08
MC/DC0%0/1
$opts->{"decode"} //= $self->decode || 0
$opts->{"decode"}
Truth table50%1/2
A
A= $opts->{"decode"}
Aresult
11
00
146 8 ▶ $opts->{encode} //= $self->encode || 0;
Condition50%2/4
$opts->{"encode"} //= $self->encode || 0
l!l
08
$self->encode || 0
l!l
08
MC/DC0%0/1
$opts->{"encode"} //= $self->encode || 0
$opts->{"encode"}
Truth table50%1/2
A
A= $opts->{"encode"}
Aresult
11
00
147 8 ▶ $opts->{token_max} //= $self->token_max;
Condition33%1/3
$opts->{"token_max"} //= $self->token_max
l!l&&r!l&&!r
008
MC/DC0%0/2
$opts->{"token_max"} //= $self->token_max
$opts->{"token_max"} $self->token_max
Truth table33%1/3
A //= B
A= $opts->{"token_max"}B= $self->token_max
ABresult
1X1
011
000
148 8 ▶ $opts->{value_max} //= $self->value_max;
Condition33%1/3
$opts->{"value_max"} //= $self->value_max
l!l&&r!l&&!r
008
MC/DC0%0/2
$opts->{"value_max"} //= $self->value_max
$opts->{"value_max"} $self->value_max
Truth table33%1/3
A //= B
A= $opts->{"value_max"}B= $self->value_max
ABresult
1X1
011
000
149 8 ▶ $opts->{separator} //= '';
Condition50%1/2
$opts->{"separator"} //= ""
l!l
08
MC/DC0%0/1
$opts->{"separator"} //= ""
$opts->{"separator"}
Truth table50%1/2
A
A= $opts->{"separator"}
Aresult
11
00
150 # If true, this will not assume the first part of the parameters passed is the main value
151 # This is the case for the header field Strict-Transport-Security
152 8 ▶ $opts->{params_only} //= 0;
Condition50%1/2
$opts->{"params_only"} //= 0
l!l
08
MC/DC0%0/1
$opts->{"params_only"} //= 0
$opts->{"params_only"}
Truth table50%1/2
A
A= $opts->{"params_only"}
Aresult
11
00
153 8 ▶ unless( $self->_is_object( $self ) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->_is_object($self)) 0 8 8
154 {
155 0 $self = bless( $opts => $self );
156 }
157 8 ▶ my $sep = CORE::length( $opts->{separator} ) ? $opts->{separator} : ';';
Branch: 1 branch
BranchTrueFalseTotal
length $opts->{'separator'} ? : 0 8 8
158 8 my @parts = ();
159 8 my $i = 0;
160 8 foreach( split( /(\\.)|$sep/, $s ) )
161 {
162 26 ▶ defined( $_ ) ? do{ $parts[$i] .= $_ } : do{ $i++ };
Branch: 1 branch
BranchTrueFalseTotal
defined $_ ? : 17 9 26
163 }
164  
165 8 my $obj;
166 8 ▶ if( $opts->{params_only} )
Branch: 1 branch
BranchTrueFalseTotal
if ($opts->{'params_only'}) { } 0 8 8
167 {
168 0 $obj = $self->new( [] );
169 }
170 else
171 {
172 8 my $header_val = shift( @parts );
173 8 my( $n, $v ) = split( /[[:blank:]\h]*\=[[:blank:]\h]*/, $header_val, 2 );
174 8 ▶ $v =~ s/^\"|(?<!\\)\"$//g if( CORE::defined( $v ) );
Branch: 1 branch
BranchTrueFalseTotal
if defined $v 6 2 8
175 8 ▶ if( $opts->{decode} )
Branch: 1 branch
BranchTrueFalseTotal
if ($opts->{"decode"}) 0 8 8
176 {
177 0 $n = URI::Escape::uri_unescape( $n );
178 0 ▶ $v = URI::Escape::uri_unescape( $v ) if( defined( $v ) );
Branch: 1 branch
BranchTrueFalseTotal
if defined $v 0 0 0
179 }
180 8 ▶ $obj = $self->new( defined( $v ) ? [$n, $v] : $n );
Branch: 1 branch
BranchTrueFalseTotal
defined $v ? : 6 2 8
181 }
182 8 $obj->debug( $opts->{debug} );
183 8 $obj->decode( $opts->{decode} );
184 8 $obj->encode( $opts->{encode} );
185 8 my $token_max_len = 0;
186 8 my $value_max_len = 0;
187 8 ▶ $token_max_len = $opts->{token_max} if( defined( $opts->{token_max} ) && CORE::length( $opts->{token_max} ) );
Branch: 1 branch
BranchTrueFalseTotal
if defined $opts->{"token_max"} and length $opts->{"token_max"} 0 8 8
Condition33%1/3
defined $opts->{"token_max"} and length $opts->{"token_max"}
!ll&&!rl&&r
800
MC/DC0%0/2
defined $opts->{"token_max"} and length $opts->{"token_max"}
defined $opts->{"token_max"} length $opts->{"token_max"}
Truth table33%1/3
A and B
A= defined $opts->{"token_max"}B= length $opts->{"token_max"}
ABresult
0X0
100
111
188 8 ▶ $value_max_len = $opts->{value_max} if( defined( $opts->{value_max} ) && CORE::length( $opts->{value_max} ) );
Branch: 1 branch
BranchTrueFalseTotal
if defined $opts->{"value_max"} and length $opts->{"value_max"} 0 8 8
Condition33%1/3
defined $opts->{"value_max"} and length $opts->{"value_max"}
!ll&&!rl&&r
800
MC/DC0%0/2
defined $opts->{"value_max"} and length $opts->{"value_max"}
defined $opts->{"value_max"} length $opts->{"value_max"}
Truth table33%1/3
A and B
A= defined $opts->{"value_max"}B= length $opts->{"value_max"}
ABresult
0X0
100
111
189  
190 8 foreach my $frag ( @parts )
191 {
192 9 $frag =~ s/^[[:blank:]\h\v]+|[[:blank:]\h\v]+$//g;
193 # Values are forbidden from having "="
194 # <https://datatracker.ietf.org/doc/html/rfc6265#section-5.2>
195 9 my( $attribute, $value ) = split( /[[:blank:]\h]*\=[[:blank:]\h]*/, $frag, 2 );
196 9 ▶ if( !defined( $attribute ) )
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $attribute) 0 9 9
197 {
198 0 ▶ warn( ref( $self ), "::new_from_header(): Found undefined attribute while splitting fragment '", ( $frag // '' ), "' in header value '", ( $s // '' ), "'.\n" );
Condition0%0/4
$frag // ""
l!l
00
$s // ""
l!l
00
MC/DC0%0/1
$frag // ""
$frag
MC/DC0%0/1
$s // ""
$s
Truth table0%0/2
A
A= $frag
Aresult
11
00
Truth table0%0/2
A
A= $s
Aresult
11
00
199 0 next;
200 }
201  
202 9 ▶ $value =~ s/^\"|\"$//g if( defined( $value ) );
Branch: 1 branch
BranchTrueFalseTotal
if defined $value 8 1 9
203 # Check character string and length. Should not be more than 255 characters
204 # https://datatracker.ietf.org/doc/html/rfc1341
205 # http://www.iana.org/assignments/media-types/media-types.xhtml
206 # Won't complain if this does not meet our requirement, but will discard it silently
207 9 ▶ if( $attribute =~ /^$TOKEN_REGEXP$/ && ( $token_max_len <= 0 || CORE::length( $attribute ) <= $token_max_len ) )
Branch: 1 branch
BranchTrueFalseTotal
if ($attribute =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ and $token_max_len <= 0 || length $attribute <= $token_max_len) { } 9 0 9
Condition33%2/6
$attribute =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ and $token_max_len <= 0 || length $attribute <= $token_max_len
!ll&&!rl&&r
009
$token_max_len <= 0 or length $attribute <= $token_max_len
l!l&&r!l&&!r
900
MC/DC0%0/3
$attribute =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ and $token_max_len <= 0 || length $attribute <= $token_max_len
$attribute =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ $token_max_len <= 0 length $attribute <= $token_max_len
Truth table25%1/4
A and B or C
A= $attribute =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/B= $token_max_len <= 0C= length $attribute <= $token_max_len
ABCresult
0XX0
1000
11X1
1011
208 {
209 9 ▶ if( defined( $value ) )
Branch: 1 branch
BranchTrueFalseTotal
if (defined $value) { } 8 1 9
210 {
211 8 ▶ if( $value =~ /^$TEXT_REGEXP$/ && ( $value_max_len <= 0 || CORE::length( $value ) <= $value_max_len ) )
Branch: 1 branch
BranchTrueFalseTotal
if ($value =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ and $value_max_len <= 0 || length $value <= $value_max_len) { } 8 0 8
Condition33%2/6
$value =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ and $value_max_len <= 0 || length $value <= $value_max_len
!ll&&!rl&&r
008
$value_max_len <= 0 or length $value <= $value_max_len
l!l&&r!l&&!r
800
MC/DC0%0/3
$value =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ and $value_max_len <= 0 || length $value <= $value_max_len
$value =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ $value_max_len <= 0 length $value <= $value_max_len
Truth table25%1/4
A and B or C
A= $value =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/B= $value_max_len <= 0C= length $value <= $value_max_len
ABCresult
0XX0
1000
11X1
1011
212 {
213 8 $obj->param( lc( $attribute ) => $value );
214 }
215 else
216 {
217 0 ▶ warn( "Value for property \"$attribute\" contained some illegal characters or exceeded the maximum size of '$value_max_len'.\n" ) if( warnings::enabled( 'Module::Generic' ) );
Branch: 1 branch
BranchTrueFalseTotal
if warnings::enabled("Module::Generic") 0 0 0
218 }
219 }
220 else
221 {
222 1 $obj->param( lc( $attribute ) => undef );
223 }
224 }
225 else
226 {
227 0 ▶ warn( "Token \"$attribute\" contains illegal characters or exceeds the maximum size of '$token_max_len'.\n" ) if( warnings::enabled( 'Module::Generic' ) );
Branch: 1 branch
BranchTrueFalseTotal
if warnings::enabled("Module::Generic") 0 0 0
228 }
229 }
230 8 return( $obj );
231 }
232  
233 # This class does not convert to an HASH
234 0 ▶sub as_hash { return( $_[0] ); }
Subroutine as_hash: not called CC=1 SCAR=6.9
Pod documented
235  
236 sub as_string
237 4 ▶{
Subroutine as_string: called CC=23 SCAR=39.2
Pod documented
238 4 my $self = shift( @_ );
239 4 ▶ if( !$self->original->defined || !$self->original->length )
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->original->defined and $self->original->length) 4 0 4
Condition33%1/3
$self->original->defined and $self->original->length
!ll&&!rl&&r
040
MC/DC0%0/2
$self->original->defined and $self->original->length
$self->original->defined $self->original->length
Truth table33%1/3
A and B
A= $self->original->definedB= $self->original->length
ABresult
0X0
100
111
240 {
241 4 ▶ my $prime_params = $self->new_array( ( @_ && $self->_is_array( $_[0] ) ) ? shift( @_ ) : [] );
Branch: 1 branch
BranchTrueFalseTotal
@_ && $self->_is_array($_[0]) ? : 0 4 4
Condition33%1/3
@_ and $self->_is_array($_[0])
!ll&&!rl&&r
400
MC/DC0%0/2
@_ and $self->_is_array($_[0])
@_ $self->_is_array($_[0])
Truth table33%1/3
A and B
A= @_B= $self->_is_array($_[0])
ABresult
0X0
100
111
242 4 my $opts = $self->_get_args_as_hash( @_ );
243 4 my $string = $self->value_as_string;
244 4 my $token_max_len = $self->token_max;
245 4 my $value_max_len = $self->value_max;
246  
247 # Append parameters
248 4 ▶ if( $self->params->length )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->params->length) 4 0 4
249 {
250 4 my $params;
251 4 ▶ if( !$prime_params->is_empty )
Branch: 1 branch
BranchTrueFalseTotal
if (not $prime_params->is_empty) { } 0 4 4
252 {
253 0 $params = $self->new_array;
254 0 foreach( @$prime_params )
255 {
256 0 ▶ $params->push( $_ ) if( $self->params->exists( $_ ) );
Branch: 1 branch
BranchTrueFalseTotal
if $self->params->exists($_) 0 0 0
257 }
258 0 my $others = $self->params->keys->except( $params );
259 0 $params->merge( $others );
260 }
261 else
262 {
263 4 $params = $self->params->keys->sort;
264 }
265 4 ▶ for( my $i = 0; $i < $params->length; $i++ )
Branch: 1 branch
BranchTrueFalseTotal
if ($i < $params->length) 9 2 11
266 {
267 9 ▶ if( $params->[$i] !~ /^$TOKEN_REGEXP$/ )
Branch: 2 branches
BranchTrueFalseTotal
if (not $params->[$i] =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/) { } 0 9 9
elsif ($token_max_len > 0 and length $params->[$i] > $token_max_len) { } 1 16 17
268 {
269 0 return( $self->error( "Invalid parameter name: \"" . $params->[$i] . "\"" ) );
270 }
271 ▶ elsif( $token_max_len > 0 && CORE::length( $params->[$i] ) > $token_max_len )
Condition66%2/3
$token_max_len > 0 and length $params->[$i] > $token_max_len
!ll&&!rl&&r
801
MC/DC50%1/2
$token_max_len > 0 and length $params->[$i] > $token_max_len
$token_max_len > 0 length $params->[$i] > $token_max_len
Truth table66%2/3
A and B
A= $token_max_len > 0B= length $params->[$i] > $token_max_len
ABresult
0X0
100
111
272 {
273 1 return( $self->error( "Parameter name \"", substr( $params->[$i], 0, $token_max_len ), "\" exceeds the maximum length of $token_max_len" ) );
274 }
275 8 ▶ if( length( $string ) > 0 )
Branch: 1 branch
BranchTrueFalseTotal
if (length $string > 0) 8 0 8
276 {
277 8 $string .= '; ';
278 }
279 # No escaping of property values
280 # $string .= $params->[$i] . '=' . ( $self->encode ? URI::Escape::uri_escape( $self->params->get( $params->[$i] ) ) : $self->qstring( $self->params->get( $params->[$i] ) ) );
281 8 my $value = $self->params->get( $params->[$i] );
282 8 ▶ if( defined( $value ) )
Branch: 1 branch
BranchTrueFalseTotal
if (defined $value) { } 7 1 8
283 {
284 7 ▶ if( $value_max_len > 0 && CORE::length( $value ) > $value_max_len )
Branch: 1 branch
BranchTrueFalseTotal
if ($value_max_len > 0 and length $value > $value_max_len) 1 6 7
Condition66%2/3
$value_max_len > 0 and length $value > $value_max_len
!ll&&!rl&&r
601
MC/DC50%1/2
$value_max_len > 0 and length $value > $value_max_len
$value_max_len > 0 length $value > $value_max_len
Truth table66%2/3
A and B
A= $value_max_len > 0B= length $value > $value_max_len
ABresult
0X0
100
111
285 {
286 1 return( $self->error( "Parameter \"", $params->[$i], "\" value exceeds the maximum length of $value_max_len" ) );
287 }
288 # If the caller has requested it, we can force the double quotes on this token name, otherwise, by default, it is automatic
289 my $qstr = $self->qstring( $value, (
290 0 ▶ ( ref( $opts->{quote} ) eq 'ARRAY' && scalar( grep( $params->[$i], @{$opts->{quote}} ) ) )
Condition40%2/5
not ref $opts->{"quote"} and ($opts->{"quote"} // "") eq $params->[$i]
!ll&&!rl&&r
060
$opts->{"quote"} // ""
l!l
06
MC/DC0%0/2
not ref $opts->{"quote"} and ($opts->{"quote"} // "") eq $params->[$i]
not ref $opts->{"quote"} $opts->{"quote"}
Truth table33%1/3
not(A) and B
A= not ref $opts->{"quote"}B= $opts->{"quote"}
ABresult
0X0
100
111
291 ||
292 6 ▶ ( !ref( $opts->{quote} ) && ( $opts->{quote} // '' ) eq $params->[$i] )
Branch: 1 branch
BranchTrueFalseTotal
ref $opts->{'quote'} eq 'ARRAY' && scalar grep($params->[$i], @{$$opts{'quote'};}) || !ref($opts->{'quote'}) && ($opts->{'quote'} // '') eq $params->[$i] ? : 0 6 6
Condition40%2/5
ref $opts->{"quote"} eq "ARRAY" and scalar grep($params->[$i], @{$$opts{"quote"};}) or not ref $opts->{"quote"} and ($opts->{"quote"} // "") eq $params->[$i]
l!l&&r!l&&!r
006
ref $opts->{"quote"} eq "ARRAY" and scalar grep($params->[$i], @{$$opts{"quote"};})
!ll
60
MC/DC0%0/2
ref $opts->{"quote"} eq "ARRAY" and scalar grep($params->[$i], @{$$opts{"quote"};}) or not ref $opts->{"quote"} and ($opts->{"quote"} // "") eq $params->[$i]
ref $opts->{"quote"} eq "ARRAY" not ref $opts->{"quote"} and ($opts->{"quote"} // "") eq $params->[$i]
Truth table33%1/3
A or B
A= ref $opts->{"quote"} eq "ARRAY"B= not ref $opts->{"quote"} and ($opts->{"quote"} // "") eq $params->[$i]
ABresult
1X1
011
000
293 ) ? ( quote => 1 ) : ()
294 );
295 6 ▶ if( !defined( $qstr ) )
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $qstr) 0 6 6
296 {
297 0 warn( $self->error );
298 0 next;
299 }
300 6 $string .= $params->[$i] . '=' . $qstr;
301 }
302 else
303 {
304 1 $string .= $params->[$i];
305 }
306 }
307 }
308 2 $self->original( $string );
309 }
310 2 return( $self->original->scalar );
311 }
312  
313 29 ▶sub decode { return( shift->_set_get_boolean( 'decode', @_ ) ); }
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
314  
315 30 ▶sub encode { return( shift->_set_get_boolean( 'encode', @_ ) ); }
Subroutine encode: called CC=1 SCAR=0.0
Pod documented
316  
317 15 ▶sub original { return( shift->_set_get_scalar_as_object( 'original', @_ ) ); }
Subroutine original: called CC=1 SCAR=0.0
Pod documented
318  
319 sub param
320 28 ▶{
Subroutine param: called CC=2 SCAR=6.9
Pod documented
321 28 my $self = shift( @_ );
322 28 my $k = shift( @_ );
323 28 ▶ if( @_ )
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 14 14 28
324 {
325 14 return( $self->params->set( $k => @_ ) );
326 }
327 14 return( $self->params->get( $k ) );
328 }
329  
330 47 ▶sub params { return( shift->_set_get_hash_as_mix_object( 'params', @_ ) ); }
Subroutine params: called CC=1 SCAR=0.0
Pod documented
331  
332 sub qstring
333 8 ▶{
Subroutine qstring: called CC=6 SCAR=18.4
Pod documented
334 8 my $self = shift( @_ );
335 8 my $str = shift( @_ );
336 8 my $opts = $self->_get_args_as_hash( @_ );
337  
338 # no need to quote tokens, unless caller explicitly requires it
339 8 ▶ if( $str =~ /^$TOKEN_REGEXP$/ || $str =~ /^\"(.*?)\"$/ )
Branch: 1 branch
BranchTrueFalseTotal
if ($str =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ or $str =~ /^\"(.*?)\"$/) 2 6 8
Condition66%2/3
$str =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ or $str =~ /^\"(.*?)\"$/
l!l&&r!l&&!r
206
MC/DC50%1/2
$str =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ or $str =~ /^\"(.*?)\"$/
$str =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/ $str =~ /^\"(.*?)\"$/
Truth table66%2/3
A or B
A= $str =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/B= $str =~ /^\"(.*?)\"$/
ABresult
1X1
011
000
340 {
341 2 ▶ if( $opts->{quote} )
Branch: 1 branch
BranchTrueFalseTotal
if ($opts->{'quote'}) { } 0 2 2
342 {
343 0 $str =~ s/$QUOTE_REGEXP/\\$1/g;
344 0 return( '"' . $str . '"' );
345 }
346 else
347 {
348 2 return( $str );
349 }
350 }
351  
352 6 ▶ if( length( $str ) > 0 && $str !~ /^$TEXT_REGEXP$/ )
Branch: 1 branch
BranchTrueFalseTotal
if (length $str > 0 and not $str =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/) 1 5 6
Condition66%2/3
length $str > 0 and not $str =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
!ll&&!rl&&r
051
MC/DC50%1/2
length $str > 0 and not $str =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
length $str > 0 not $str =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
Truth table66%2/3
A and not(B)
A= length $str > 0B= not $str =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
ABresult
0X0
100
111
353 {
354 1 return( $self->error( 'Invalid parameter value' ) );
355 }
356  
357 # An empty string is valid as a quoted-string per RFC 2616
358 5 $str =~ s/$QUOTE_REGEXP/\\$1/g;
359 5 return( '"' . $str . '"' );
360 }
361  
362 sub reset
363 1 ▶{
Subroutine reset: called CC=1 SCAR=0.0
Pod documented
364 1 my $self = shift( @_ );
365 1 $self->{original} = '';
366 1 return( $self );
367 }
368  
369 sub token_escape
370 1 ▶{
Subroutine token_escape: called CC=3 SCAR=11.6
Pod documented
371 1 my $self = shift( @_ );
372 1 my $v = shift( @_ );
373 1 ▶ return( $v ) if( !defined( $v ) || !length( $v ) );
Branch: 1 branch
BranchTrueFalseTotal
unless defined $v and length $v 0 1 1
Condition33%1/3
defined $v and length $v
!ll&&!rl&&r
001
MC/DC0%0/2
defined $v and length $v
defined $v length $v
Truth table33%1/3
A and B
A= defined $vB= length $v
ABresult
0X0
100
111
374 1 $v =~ s/($DELIMITER)/sprintf("%%%02X", ord($1))/ge;
375 1 return( $v );
376 }
377  
378 16 ▶sub token_max { return( shift->_set_get_number( 'token_max', @_ ) ); }
Subroutine token_max: called CC=1 SCAR=0.0
Pod documented
379  
380 33 ▶sub value { return( shift->_set_get_array_as_object( 'value', @_ ) ); }
Subroutine value: called CC=1 SCAR=0.0
Pod documented
381  
382 sub value_as_string
383 13 ▶{
Subroutine value_as_string: called CC=14 SCAR=29.9
Pod documented
384 13 my $self = shift( @_ );
385 13 my $string = '';
386 13 ▶ if( $self->value->length )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->value->length) 13 0 13
387 {
388 13 my( $n, $v ) = $self->value->list;
389 13 ▶ if( defined( $v ) && $n !~ /^$TOKEN_REGEXP$/ )
Branch: 2 branches
BranchTrueFalseTotal
if (defined $v and not $n =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/) { } 0 13 13
elsif (not defined $v || $n =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/) { } 0 13 13
Condition66%2/3
defined $v and not $n =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/
!ll&&!rl&&r
2110
MC/DC0%0/2
defined $v and not $n =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/
defined $v not $n =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/
Truth table66%2/3
A and not(B)
A= defined $vB= not $n =~ /^$Module::Generic::HeaderValue::TOKEN_REGEXP$/
ABresult
0X0
100
111
390 {
391 0 ▶ if( $self->encode )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->encode) { } 0 0 0
392 {
393 # $n = URI::Escape::uri_escape( $n );
394 # We cannot simply use URI::Escape, because the scope of what we need to
395 # escape and NOT escape is not aligned with what URI::Escape does
396 0 $n = $self->token_escape( $n );
397 }
398 else
399 {
400 0 return( $self->error( "Invalid token \"$n\"" ) );
401 }
402 }
403 ▶ elsif( !defined( $v ) && $n !~ /^$TEXT_REGEXP$/ )
Condition66%2/3
defined $v || $n =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
l!l&&r!l&&!r
1120
MC/DC0%0/2
defined $v || $n =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
defined $v $n =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
Truth table66%2/3
A || B
A= defined $vB= $n =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/
ABresult
1X1
011
000
404 {
405 0 return( $self->error( "Invalid value \"$n\"" ) );
406 }
407 13 ▶ if( defined( $v ) && $self->encode )
Branch: 1 branch
BranchTrueFalseTotal
if (defined $v and $self->encode) 2 11 13
Condition100%3/3
defined $v and $self->encode
!ll&&!rl&&r
292
MC/DC100%2/2
defined $v and $self->encode
defined $v $self->encode
Truth table100%3/3
A and B
A= defined $vB= $self->encode
ABresult
0X0
100
111
408 {
409 2 ▶ $v = URI::Escape::uri_escape( $v ) if( $v !~ /^$TEXT_REGEXP$/ || $v =~ /=/ );
Branch: 1 branch
BranchTrueFalseTotal
if not $v =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ or $v =~ /=/ 1 1 2
Condition66%2/3
not $v =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ or $v =~ /=/
l!l&&r!l&&!r
011
MC/DC50%1/2
not $v =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ or $v =~ /=/
not $v =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/ $v =~ /=/
Truth table66%2/3
not(A) or B
A= not $v =~ /^$Module::Generic::HeaderValue::TEXT_REGEXP$/B= $v =~ /=/
ABresult
1X1
011
000
410 }
411 13 ▶ $v = qq{"${v}"} if( CORE::defined( $v ) && $v =~ /$DELIMITERS/ );
Branch: 1 branch
BranchTrueFalseTotal
if defined $v and $v =~ /$Module::Generic::HeaderValue::DELIMITERS/ 0 13 13
Condition66%2/3
defined $v and $v =~ /$Module::Generic::HeaderValue::DELIMITERS/
!ll&&!rl&&r
2110
MC/DC0%0/2
defined $v and $v =~ /$Module::Generic::HeaderValue::DELIMITERS/
defined $v $v =~ /$Module::Generic::HeaderValue::DELIMITERS/
Truth table66%2/3
A and B
A= defined $vB= $v =~ /$Module::Generic::HeaderValue::DELIMITERS/
ABresult
0X0
100
111
412 13 ▶ $string = defined( $v ) ? join( '=', $n, $v ) : $n;
Branch: 1 branch
BranchTrueFalseTotal
defined $v ? : 11 2 13
413 }
414 13 return( $string );
415 }
416  
417 sub value_data
418 1 ▶{
Subroutine value_data: called CC=2 SCAR=7.4
Pod documented
419 1 my $self = shift( @_ );
420 1 my $ref = $self->value;
421 # If this is only one-element array, this means the only element is the value
422 # return( $ref->first ) if( $ref->length == 1 );
423 # otherwise, the first element is the name, and this is not what the caller wants
424 # we return an empty string, not undef, because undef is associated with errors
425 # return( '' );
426 1 ▶ if( $ref->length == 1 )
Branch: 1 branch
BranchTrueFalseTotal
if ($ref->length == 1) { } 0 1 1
427 {
428 0 return( $ref->first );
429 }
430 # Either empty (returns undef) or 2-element: [name, value]
431 else
432 {
433 1 return( $ref->second );
434 }
435 }
436  
437 16 ▶sub value_max { return( shift->_set_get_number( 'value_max', @_ ) ); }
Subroutine value_max: called CC=1 SCAR=0.0
Pod documented
438  
439 sub value_name
440 5 ▶{
Subroutine value_name: called CC=2 SCAR=6.9
Pod documented
441 5 my $self = shift( @_ );
442 5 my $ref = $self->value;
443 # If this is only one-element array, this means the only element is the value
444 5 ▶ return( '' ) if( $ref->length == 1 );
Branch: 1 branch
BranchTrueFalseTotal
if $ref->length == 1 4 1 5
445 # otherwise, the first element is the name
446 1 return( $ref->first );
447 }
448  
449 sub FREEZE
450 2 ▶{
Subroutine FREEZE: called CC=6 SCAR=18.3
Pod undocumented
451 2 my $self = CORE::shift( @_ );
452 2 ▶ my $serialiser = CORE::shift( @_ ) // '';
Condition50%1/2
shift @_ // ""
l!l
20
MC/DC0%0/1
shift @_ // ""
shift @_
Truth table50%1/2
A
A= shift @_
Aresult
11
00
453 2 my $class = CORE::ref( $self );
454 2 my @props = qw( original value decode encode params token_max value_max );
455 2 my $hash = {};
456 2 foreach my $prop ( @props )
457 {
458 14 ▶ if( exists( $self->{ $prop } ) )
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{$prop}) 14 0 14
459 {
460 14 $hash->{ $prop } = $self->{ $prop };
461 }
462 }
463 # Return an array reference rather than a list so this works with Sereal and CBOR
464 # On or before Sereal version 4.023, Sereal did not support multiple values returned
465 2 ▶ if( $serialiser eq 'Sereal' )
Branch: 1 branch
BranchTrueFalseTotal
if ($serialiser eq "Sereal") 1 1 2
466 {
467 1 require Sereal::Encoder;
468 1 require version;
469
470 1 ▶ if( version->parse( Sereal::Encoder->VERSION ) <= version->parse( '4.023' ) )
Branch: 1 branch
BranchTrueFalseTotal
if ("version"->parse("Sereal::Encoder"->VERSION) <= "version"->parse("4.023")) 0 1 1
471 {
472 0 CORE::return( [$class, $hash] );
473 }
474 }
475 # But Storable want a list with the first element being the serialised element
476 2 CORE::return( $class, $hash );
477 }
478  
479 1 ▶sub STORABLE_freeze { CORE::return( CORE::shift->FREEZE( @_ ) ); }
Subroutine STORABLE_freeze: called CC=1 SCAR=0.0
Pod undocumented
480  
481 1 ▶sub STORABLE_thaw { CORE::return( CORE::shift->THAW( @_ ) ); }
Subroutine STORABLE_thaw: called CC=1 SCAR=0.0
Pod undocumented
482  
483 # NOTE: CBOR will call the THAW method with the stored classname as first argument, the constant string CBOR as second argument, and all values returned by FREEZE as remaining arguments.
484 # NOTE: Storable calls it with a blessed object it created followed with $cloning and any other arguments initially provided by STORABLE_freeze
485 sub THAW
486 2 ▶{
Subroutine THAW: called CC=10 SCAR=27.6
Pod undocumented
487 2 my( $self, undef, @args ) = @_;
488 2 ▶ my $ref = ( CORE::scalar( @args ) == 1 && CORE::ref( $args[0] ) eq 'ARRAY' ) ? CORE::shift( @args ) : \@args;
Branch: 1 branch
BranchTrueFalseTotal
scalar @args == 1 && ref $args[0] eq 'ARRAY' ? : 0 2 2
Condition33%1/3
scalar @args == 1 and ref $args[0] eq "ARRAY"
!ll&&!rl&&r
200
MC/DC0%0/2
scalar @args == 1 and ref $args[0] eq "ARRAY"
scalar @args == 1 ref $args[0] eq "ARRAY"
Truth table33%1/3
A and B
A= scalar @args == 1B= ref $args[0] eq "ARRAY"
ABresult
0X0
100
111
489 2 ▶ my $class = ( CORE::defined( $ref ) && CORE::ref( $ref ) eq 'ARRAY' && CORE::scalar( @$ref ) > 1 ) ? CORE::shift( @$ref ) : ( CORE::ref( $self ) || $self );
Branch: 1 branch
BranchTrueFalseTotal
defined $ref && ref $ref eq 'ARRAY' && scalar @$ref > 1 ? : 2 0 2
Condition22%2/9
defined $ref and ref $ref eq "ARRAY" and scalar @$ref > 1
!ll&&!rl&&r
002
defined $ref and ref $ref eq "ARRAY"
!ll&&!rl&&r
002
ref $self or $self
l!l&&r!l&&!r
000
MC/DC0%0/3
defined $ref and ref $ref eq "ARRAY" and scalar @$ref > 1
defined $ref ref $ref eq "ARRAY" scalar @$ref > 1
MC/DC0%0/2
ref $self or $self
ref $self $self
Truth table25%1/4
A and B and C
A= defined $refB= ref $ref eq "ARRAY"C= scalar @$ref > 1
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= ref $selfB= $self
ABresult
1X1
011
000
490 2 ▶ my $hash = CORE::ref( $ref ) eq 'ARRAY' ? CORE::shift( @$ref ) : {};
Branch: 1 branch
BranchTrueFalseTotal
ref $ref eq 'ARRAY' ? : 2 0 2
491 2 my $new;
492 # Storable pattern requires to modify the object it created rather than returning a new one
493 2 ▶ if( CORE::ref( $self ) )
Branch: 1 branch
BranchTrueFalseTotal
if (ref $self) { } 1 1 2
494 {
495 1 foreach( CORE::keys( %$hash ) )
496 {
497 7 $self->{ $_ } = CORE::delete( $hash->{ $_ } );
498 }
499 1 $new = $self;
500 }
501 else
502 {
503 1 $new = CORE::bless( $hash => $class );
504 }
505 2 CORE::return( $new );
506 }
507  
508 4 1;
509 # NOTE: POD
510 __END__
« lib/Module/Generic/Scalar/IO.pm ↑ Summary lib/Module/Generic/File/Magic.pm »