blib/lib/TOML/Parser/Tokenizer.pm

filter: Statementstmt 98.5% 202 / 205 Branchbran 90.7% 78 / 86 Conditioncond 71.4% 25 / 35 MC/DCmcdc 22.2% 4 / 18 Subroutinesub 100% 19 / 19 Podpod 0.0% 0 / 2 totaltotal 89.8% 328 / 365 SCAR 41.1
CC
60
Cov
94%
_tokenize_value
13.3
_tokenize_array_of_table
8.0
_tokenize_inline_table
8.0
CRAP 61.0
« blib/lib/TOML/Parser.pm ↑ Summary blib/lib/TOML/Parser/Tokenizer/Strict.pm »
1 package TOML::Parser::Tokenizer;
2 20 ▶use 5.010000;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 20 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 20 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 20 ▶use Exporter 5.57 'import';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 20 ▶use constant DEBUG => $ENV{TOML_PARSER_TOKENIZER_DEBUG} ? 1 : 0;
Subroutine BEGIN: called CC=2 SCAR=7.1
Branch: 1 branch
BranchTrueFalseTotal
$ENV{'TOML_PARSER_TOKENIZER_DEBUG'} ? : 0 20 20
9  
10 BEGIN {
11 20 ▶ my @TOKENS = map uc, qw/
Subroutine BEGIN: called CC=1 SCAR=0.0
12 comment
13 table
14 array_of_table
15 key
16 integer
17 float
18 boolean
19 datetime
20 string
21 multi_line_string_begin
22 multi_line_string_end
23 inline_table_begin
24 inline_table_end
25 array_begin
26 array_end
27 /;
28 my %CONSTANTS = map {
29 20 ("TOKEN_$_" => $_)
30 } @TOKENS;
31  
32 20 require constant;
33 20 constant->import(\%CONSTANTS);
34  
35 # Exporter
36 20 our @EXPORT_OK = keys %CONSTANTS;
37 20 our %EXPORT_TAGS = (
38 constant => [keys %CONSTANTS],
39 );
40 };
41  
42 sub grammar_regexp {
43 return +{
44 878 ▶ comment => qr{#(.*)},
Subroutine grammar_regexp: called CC=1 SCAR=0.0
Pod undocumented
45 table => {
46 start => qr{\[},
47 key => qr{(?:"(.*?)(?<!(?<!\\)\\)"|\'(.*?)(?<!(?<!\\)\\)\'|([^.\s\\\]]+))},
48 sep => qr{\.},
49 end => qr{\]},
50 },
51 array_of_table => {
52 start => qr{\[\[},
53 key => qr{(?:"(.*?)(?<!(?<!\\)\\)"|\'(.*?)(?<!(?<!\\)\\)\'|([^.\s\\\]]+))},
54 sep => qr{\.},
55 end => qr{\]\]},
56 },
57 key => qr{(?:"(.*?)(?<!(?<!\\)\\)"|\'(.*?)(?<!(?<!\\)\\)\'|([^\s=]+))\s*=},
58 value => {
59 datetime => qr{([0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\.[0-9]+)?(?:Z|[-+][0-9]{2}:[0-9]{2}))},
60 float => qr{([-+]?(?:[0-9_]+(?:\.[0-9_]+)?[eE][-+]?[0-9_]+|[0-9_]*\.[0-9_]+))},
61 integer => qr{([-+]?[0-9_]+)},
62 boolean => qr{(true|false)},
63 string => qr{(?:"(.*?)(?<!(?<!\\)\\)"|\'(.*?)(?<!(?<!\\)\\)\')},
64 mlstring => qr{("""|''')},
65 inline => {
66 start => qr{\{},
67 sep => qr{\s*,\s*},
68 end => qr{\}},
69 },
70 array => {
71 start => qr{\[},
72 sep => qr{\s*,\s*},
73 end => qr{\]},
74 },
75 },
76 };
77 }
78  
79 sub tokenize {
80 56 ▶ my ($class, $src) = @_;
Subroutine tokenize: called CC=1 SCAR=0.0
Pod undocumented
81  
82 56 local $_ = $src;
83 56 return $class->_tokenize();
84 }
85  
86 sub _tokenize {
87 56 ▶ my $class = shift;
Subroutine _tokenize: called CC=8 SCAR=20.8
88 56 my $grammar_regexp = $class->grammar_regexp();
89  
90 56 my @tokens;
91 56 ▶ until (/\G\z/mgco) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G\z/cgmo) 467 36 503
92 467 ▶ if (/\G$grammar_regexp->{comment}/mgc) {
Branch: 5 branches
BranchTrueFalseTotal
if (/\G$grammar_regexp->{'comment'}/cgm) { } 72 395 467
elsif (/\G$grammar_regexp->{'array_of_table'}{'start'}/cgm) { } 23 372 395
elsif (/\G$grammar_regexp->{'table'}{'start'}/cgm) { } 49 323 372
elsif (my(@t) = $class->_tokenize_key_and_value) { } 225 92 317
elsif (/\G\s+/cgmo) { } 89 3 92
93 72 warn "[TOKEN] COMMENT: $1" if DEBUG;
94 72 $class->_skip_whitespace();
95 72 ▶ push @tokens => [TOKEN_COMMENT, $1 || ''];
Condition100%2/2
$1 || ''
l!l
5814
MC/DC100%1/1
$1 || ''
$1
Truth table100%2/2
A
A= $1
Aresult
11
00
96 }
97 elsif (/\G$grammar_regexp->{array_of_table}->{start}/mgc) {
98 23 push @tokens => $class->_tokenize_array_of_table();
99 }
100 elsif (/\G$grammar_regexp->{table}->{start}/mgc) {
101 49 push @tokens => $class->_tokenize_table();
102 }
103 elsif (my @t = $class->_tokenize_key_and_value()) {
104 225 push @tokens => @t;
105 }
106 elsif (/\G\s+/mgco) {
107 # pass through
108 89 $class->_skip_whitespace();
109 }
110 else {
111 3 $class->_syntax_error();
112 }
113 }
114 36 return @tokens;
115 }
116  
117 sub _tokenize_key_and_value {
118 369 ▶ my $class = shift;
Subroutine _tokenize_key_and_value: called CC=4 SCAR=13.9
119 369 my $grammar_regexp = $class->grammar_regexp();
120  
121 369 my @tokens;
122 369 ▶ if (/\G$grammar_regexp->{key}/mgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G$grammar_regexp->{"key"}/cgm) 277 92 369
123 277 ▶ my $key = $1 || $2 || $3;
Condition83%5/6
$1 || $2 || $3
l!l&&r!l&&!r
1191580
$1 or $2
l!l&&r!l&&!r
6113158
MC/DC0%0/3
$1 || $2 || $3
$1 $2 $3
Truth table75%3/4
A or B || C
A= $1B= $2C= $3
ABCresult
1XX1
01X1
0011
0000
124 277 warn "[TOKEN] KEY: $key" if DEBUG;
125 277 $class->_skip_whitespace();
126 277 push @tokens => [TOKEN_KEY, $key];
127 277 push @tokens => $class->_tokenize_value();
128 271 return @tokens;
129 }
130  
131 92 return;
132 }
133  
134 sub _tokenize_value {
135 332 ▶ my $class = shift;
Subroutine _tokenize_value: called CC=13 SCAR=25.9
136 332 my $grammar_regexp = $class->grammar_regexp();
137 332 warn "[CALL] _tokenize_value" if DEBUG;
138  
139 332 ▶ if (/\G$grammar_regexp->{comment}/mgc) {
Branch: 9 branches
BranchTrueFalseTotal
if (/\G$grammar_regexp->{'comment'}/cgm) { } 0 332 332
elsif (/\G$grammar_regexp->{'value'}{'datetime'}/cgm) { } 2 330 332
elsif (/\G$grammar_regexp->{'value'}{'float'}/cgm) { } 20 310 330
elsif (/\G$grammar_regexp->{'value'}{'integer'}/cgm) { } 78 232 310
elsif (/\G$grammar_regexp->{'value'}{'boolean'}/cgm) { } 4 228 232
elsif (/\G$grammar_regexp->{'value'}{'mlstring'}/cgm) { } 21 207 228
elsif (/\G$grammar_regexp->{'value'}{'string'}/cgm) { } 155 52 207
elsif (/\G$grammar_regexp->{'value'}{'inline'}{'start'}/cgm) { } 17 35 52
elsif (/\G$grammar_regexp->{'value'}{'array'}{'start'}/cgm) { } 32 3 35
140 0 warn "[TOKEN] COMMENT: $1" if DEBUG;
141 0 $class->_skip_whitespace();
142 0 ▶ return [TOKEN_COMMENT, $1 || ''];
Condition0%0/2
$1 || ''
l!l
00
MC/DC0%0/1
$1 || ''
$1
Truth table0%0/2
A
A= $1
Aresult
11
00
143 }
144 elsif (/\G$grammar_regexp->{value}->{datetime}/mgc) {
145 2 warn "[TOKEN] DATETIME: $1" if DEBUG;
146 2 $class->_skip_whitespace();
147 2 return [TOKEN_DATETIME, $1];
148 }
149 elsif (/\G$grammar_regexp->{value}->{float}/mgc) {
150 20 warn "[TOKEN] FLOAT: $1" if DEBUG;
151 20 $class->_skip_whitespace();
152 20 return [TOKEN_FLOAT, $1];
153 }
154 elsif (/\G$grammar_regexp->{value}->{integer}/mgc) {
155 78 warn "[TOKEN] INTEGER: $1" if DEBUG;
156 78 $class->_skip_whitespace();
157 78 return [TOKEN_INTEGER, $1];
158 }
159 elsif (/\G$grammar_regexp->{value}->{boolean}/mgc) {
160 4 warn "[TOKEN] BOOLEAN: $1" if DEBUG;
161 4 $class->_skip_whitespace();
162 4 return [TOKEN_BOOLEAN, $1];
163 }
164 elsif (/\G$grammar_regexp->{value}->{mlstring}/mgc) {
165 21 warn "[TOKEN] MULTI LINE STRING: $1" if DEBUG;
166 return (
167 21 [TOKEN_MULTI_LINE_STRING_BEGIN],
168 $class->_extract_multi_line_string($1),
169 [TOKEN_MULTI_LINE_STRING_END],
170 );
171 }
172 elsif (/\G$grammar_regexp->{value}->{string}/mgc) {
173 155 warn "[TOKEN] STRING: $1" if DEBUG;
174 155 $class->_skip_whitespace();
175  
176 155 my $is_raw = defined $2;
177 155 ▶ return [TOKEN_STRING, defined $1 ? $1 : defined $2 ? $2 : '', $is_raw];
Branch: 2 branches
BranchTrueFalseTotal
defined $1 ? : 141 14 155
defined $2 ? : 14 0 14
178 }
179 elsif (/\G$grammar_regexp->{value}->{inline}->{start}/mgc) {
180 17 warn "[TOKEN] INLINE TABLE" if DEBUG;
181 17 $class->_skip_whitespace();
182 return (
183 17 [TOKEN_INLINE_TABLE_BEGIN],
184 $class->_tokenize_inline_table(),
185 [TOKEN_INLINE_TABLE_END],
186 );
187 }
188 elsif (/\G$grammar_regexp->{value}->{array}->{start}/mgc) {
189 32 warn "[TOKEN] ARRAY" if DEBUG;
190 32 $class->_skip_whitespace();
191 return (
192 32 [TOKEN_ARRAY_BEGIN],
193 $class->_tokenize_array(),
194 [TOKEN_ARRAY_END],
195 );
196 }
197  
198 3 $class->_syntax_error();
199 }
200  
201 sub _tokenize_table {
202 49 ▶ my $class = shift;
Subroutine _tokenize_table: called CC=8 SCAR=20.8
203  
204 49 my $grammar_regexp = $class->grammar_regexp()->{table};
205 49 warn "[CALL] _tokenize_table" if DEBUG;
206  
207 49 $class->_skip_whitespace();
208  
209 49 my @expected = ($grammar_regexp->{key});
210  
211 49 my @keys;
212 LOOP:
213 49 while (1) {
214 157 for my $rx (@expected) {
215 201 ▶ if (/\G$rx/smgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G$rx/cgms) 151 50 201
216 151 ▶ if ($rx eq $grammar_regexp->{key}) {
Branch: 3 branches
BranchTrueFalseTotal
if ($rx eq $grammar_regexp->{'key'}) { } 76 75 151
elsif ($rx eq $grammar_regexp->{'sep'}) { } 32 43 75
elsif ($rx eq $grammar_regexp->{'end'}) { } 43 0 43
217 76 ▶ my $key = $1 || $2 || $3;
Condition83%5/6
$1 || $2 || $3
l!l&&r!l&&!r
37390
$1 or $2
l!l&&r!l&&!r
43339
MC/DC0%0/3
$1 || $2 || $3
$1 $2 $3
Truth table75%3/4
A or B || C
A= $1B= $2C= $3
ABCresult
1XX1
01X1
0011
0000
218 76 warn "[TOKEN] table key: $key" if DEBUG;
219 76 push @keys => $key;
220 76 @expected = ($grammar_regexp->{sep}, $grammar_regexp->{end});
221 }
222 elsif ($rx eq $grammar_regexp->{sep}) {
223 32 warn "[TOKEN] table key separator" if DEBUG;
224 32 @expected = ($grammar_regexp->{key});
225 }
226 elsif ($rx eq $grammar_regexp->{end}) {
227 43 warn "[TOKEN] table key end" if DEBUG;
228 43 @expected = ();
229 43 last LOOP;
230 }
231 108 $class->_skip_whitespace();
232 108 next LOOP;
233 }
234 }
235  
236 6 $class->_syntax_error();
237 }
238  
239 43 warn "[TOKEN] TABLE: @{[ join '.', @keys ]}" if DEBUG;
240 43 return [TOKEN_TABLE, \@keys];
241 }
242  
243 sub _tokenize_array_of_table {
244 23 ▶ my $class = shift;
Subroutine _tokenize_array_of_table: called CC=8 SCAR=20.8
245  
246 23 my $grammar_regexp = $class->grammar_regexp()->{array_of_table};
247 23 warn "[CALL] _tokenize_array_of_table" if DEBUG;
248  
249 23 $class->_skip_whitespace();
250  
251 23 my @expected = ($grammar_regexp->{key});
252  
253 23 my @keys;
254 LOOP:
255 23 while (1) {
256 57 for my $rx (@expected) {
257 75 ▶ if (/\G$rx/smgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G$rx/cgms) 52 23 75
258 52 ▶ if ($rx eq $grammar_regexp->{key}) {
Branch: 3 branches
BranchTrueFalseTotal
if ($rx eq $grammar_regexp->{'key'}) { } 26 26 52
elsif ($rx eq $grammar_regexp->{'sep'}) { } 8 18 26
elsif ($rx eq $grammar_regexp->{'end'}) { } 18 0 18
259 26 ▶ my $key = $1 || $2 || $3;
Condition66%4/6
$1 || $2 || $3
l!l&&r!l&&!r
10160
$1 or $2
l!l&&r!l&&!r
01016
MC/DC0%0/3
$1 || $2 || $3
$1 $2 $3
Truth table50%2/4
A or B || C
A= $1B= $2C= $3
ABCresult
1XX1
01X1
0011
0000
260 26 warn "[TOKEN] table key: $key" if DEBUG;
261 26 push @keys => $key;
262 26 @expected = ($grammar_regexp->{sep}, $grammar_regexp->{end});
263 }
264 elsif ($rx eq $grammar_regexp->{sep}) {
265 8 warn "[TOKEN] table key separator" if DEBUG;
266 8 @expected = ($grammar_regexp->{key});
267 }
268 elsif ($rx eq $grammar_regexp->{end}) {
269 18 warn "[TOKEN] table key end" if DEBUG;
270 18 @expected = ();
271 18 last LOOP;
272 }
273 34 $class->_skip_whitespace();
274 34 next LOOP;
275 }
276 }
277  
278 5 $class->_syntax_error();
279 }
280  
281 18 warn "[TOKEN] ARRAY_OF_TABLE: @{[ join '.', @keys ]}" if DEBUG;
282 18 return [TOKEN_ARRAY_OF_TABLE, \@keys];
283 }
284  
285 sub _extract_multi_line_string {
286 21 ▶ my ($class, $delimiter) = @_;
Subroutine _extract_multi_line_string: called CC=2 SCAR=6.9
287 21 my $is_raw = $delimiter eq q{'''};
288 21 ▶ if (/\G(.+?)\Q$delimiter/smgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G(.+?)\Q$delimiter\E/cgms) 20 1 21
289 20 warn "[TOKEN] MULTI LINE STRING: $1" if DEBUG;
290 20 $class->_skip_whitespace();
291 20 return [TOKEN_STRING, $1, $is_raw];
292 }
293 1 $class->_syntax_error();
294 }
295  
296 sub _tokenize_inline_table {
297 17 ▶ my $class = shift;
Subroutine _tokenize_inline_table: called CC=8 SCAR=20.8
298  
299 17 my $common_grammar_regexp = $class->grammar_regexp();
300 17 my $grammar_regexp = $common_grammar_regexp->{value}->{inline};
301  
302 17 warn "[CALL] _tokenize_inline_table" if DEBUG;
303 17 ▶ return if /\G(?:$grammar_regexp->{sep})?$grammar_regexp->{end}/smgc;
Branch: 1 branch
BranchTrueFalseTotal
if /\G(?:$grammar_regexp->{"sep"})?$grammar_regexp->{"end"}/cgms 0 17 17
304  
305 17 my $need_sep = 0;
306  
307 17 my @tokens;
308 17 while (1) {
309 94 warn "[CONTEXT] _tokenize_inline_table [loop]" if DEBUG;
310  
311 94 $class->_skip_whitespace();
312 94 ▶ if (/\G$common_grammar_regexp->{comment}/mgc) {
Branch: 2 branches
BranchTrueFalseTotal
if (/\G$common_grammar_regexp->{'comment'}/cgm) { } 2 92 94
elsif (/\G$grammar_regexp->{'end'}/cgm) { } 16 76 92
313 2 warn "[TOKEN] COMMENT: $1" if DEBUG;
314 2 ▶ push @tokens => [TOKEN_COMMENT, $1 || ''];
Condition50%1/2
$1 || ''
l!l
20
MC/DC0%0/1
$1 || ''
$1
Truth table50%1/2
A
A= $1
Aresult
11
00
315 2 next;
316 }
317 elsif (/\G$grammar_regexp->{end}/mgc) {
318 16 last;
319 }
320  
321 76 ▶ if ($need_sep) {
Branch: 1 branch
BranchTrueFalseTotal
if ($need_sep) { } 30 46 76
322 30 ▶ if (/\G$grammar_regexp->{sep}/smgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G$grammar_regexp->{"sep"}/cgms) 29 1 30
323 29 $need_sep = 0;
324 29 next;
325 }
326 }
327 else {
328 46 ▶ if (my @t = $class->_tokenize_key_and_value()) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@t) = $class->_tokenize_key_and_value) 46 0 46
329 46 push @tokens => @t;
330 46 $need_sep = 1;
331 46 next;
332 }
333 }
334  
335 1 $class->_syntax_error();
336 }
337  
338 16 return @tokens;
339 }
340  
341 sub _tokenize_array {
342 32 ▶ my $class = shift;
Subroutine _tokenize_array: called CC=8 SCAR=20.8
343  
344 32 my $common_grammar_regexp = $class->grammar_regexp();
345 32 my $grammar_regexp = $common_grammar_regexp->{value}->{array};
346  
347 32 warn "[CALL] _tokenize_array" if DEBUG;
348 32 ▶ return if /\G(?:$grammar_regexp->{sep})?$grammar_regexp->{end}/smgc;
Branch: 1 branch
BranchTrueFalseTotal
if /\G(?:$grammar_regexp->{"sep"})?$grammar_regexp->{"end"}/cgms 2 30 32
349  
350 30 my $need_sep = 0;
351  
352 30 my @tokens;
353 30 while (1) {
354 126 warn "[CONTEXT] _tokenize_inline_table [loop]" if DEBUG;
355  
356 126 $class->_skip_whitespace();
357 126 ▶ if (/\G$common_grammar_regexp->{comment}/mgc) {
Branch: 2 branches
BranchTrueFalseTotal
if (/\G$common_grammar_regexp->{'comment'}/cgm) { } 7 119 126
elsif (/\G$grammar_regexp->{'end'}/cgm) { } 29 90 119
358 7 warn "[TOKEN] COMMENT: $1" if DEBUG;
359 7 ▶ push @tokens => [TOKEN_COMMENT, $1 || ''];
Condition50%1/2
$1 || ''
l!l
70
MC/DC0%0/1
$1 || ''
$1
Truth table50%1/2
A
A= $1
Aresult
11
00
360 7 next;
361 }
362 elsif (/\G$grammar_regexp->{end}/mgc) {
363 29 last;
364 }
365  
366 90 ▶ if ($need_sep) {
Branch: 1 branch
BranchTrueFalseTotal
if ($need_sep) { } 35 55 90
367 35 ▶ if (/\G$grammar_regexp->{sep}/smgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G$grammar_regexp->{"sep"}/cgms) 34 1 35
368 34 $need_sep = 0;
369 34 next;
370 }
371 }
372 else {
373 55 ▶ if (my @t = $class->_tokenize_value()) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@t) = $class->_tokenize_value) 55 0 55
374 55 push @tokens => @t;
375 55 $need_sep = 1;
376 55 next;
377 }
378 }
379  
380 1 $class->_syntax_error();
381 }
382  
383 29 return @tokens;
384 }
385  
386 sub _skip_whitespace {
387 1200 ▶ my $class = shift;
Subroutine _skip_whitespace: called CC=2 SCAR=6.9
388 1200 ▶ if (/\G\s+/smgco) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G\s+/cgmos) 610 590 1200
389 # pass through
390 610 warn "[PASS] WHITESPACE" if DEBUG;
391 }
392 }
393  
394 20 ▶sub _syntax_error { shift->_error('Syntax Error') }
Subroutine _syntax_error: called CC=1 SCAR=0.0
395  
396 sub _error {
397 20 ▶ my ($class, $msg) = @_;
Subroutine _error: called CC=7 SCAR=19.5
398  
399 20 my $src = $_;
400 20 ▶ my $curr = pos || 0;
Condition100%2/2
pos $_ || 0
l!l
191
MC/DC100%1/1
pos $_ || 0
pos $_
Truth table100%2/2
A
A= pos $_
Aresult
11
00
401 20 my $line = 1;
402 20 ▶ my $start = pos $src || 0;
Condition50%1/2
pos $src || 0
l!l
020
MC/DC0%0/1
pos $src || 0
pos $src
Truth table50%1/2
A
A= pos $src
Aresult
11
00
403 20 ▶ while ($src =~ /$/smgco and pos $src <= $curr) {
Branch: 1 branch
BranchTrueFalseTotal
if ($src =~ /$/cgmos and pos $src <= $curr) 28 20 48
Condition66%2/3
$src =~ /$/cgmos and pos $src <= $curr
!ll&&!rl&&r
02028
MC/DC50%1/2
$src =~ /$/cgmos and pos $src <= $curr
$src =~ /$/cgmos pos $src <= $curr
Truth table66%2/3
A and B
A= $src =~ /$/cgmosB= pos $src <= $curr
ABresult
0X0
100
111
404 28 $start = pos $src;
405 28 $line++;
406 }
407 20 my $end = pos $src;
408 20 my $len = $curr - $start;
409 20 ▶ $len-- if $len > 0;
Branch: 1 branch
BranchTrueFalseTotal
if $len > 0 18 2 20
410  
411 20 ▶ my $trace = join "\n",
Condition100%2/2
$start || 0
l!l
713
MC/DC100%1/1
$start || 0
$start
Truth table100%2/2
A
A= $start
Aresult
11
00
412 "${msg}: line:$line",
413 substr($src, $start || 0, $end - $start),
414 (' ' x $len) . '^';
415 20 die $trace, "\n";
416 }
417  
418 20 1;
419 __END__
« blib/lib/TOML/Parser.pm ↑ Summary blib/lib/TOML/Parser/Tokenizer/Strict.pm »