line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
37
|
|
|
37
|
|
266
|
use strict; |
|
37
|
|
|
|
|
108
|
|
|
37
|
|
|
|
|
1152
|
|
3
|
37
|
|
|
37
|
|
236
|
use warnings; |
|
37
|
|
|
|
|
110
|
|
|
37
|
|
|
|
|
1584
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception; |
6
|
37
|
|
|
37
|
|
10052
|
use Devel::StackTrace; |
|
37
|
|
|
|
|
111777
|
|
|
37
|
|
|
|
|
1315
|
|
7
|
37
|
|
|
37
|
|
279
|
use Scalar::Util qw(blessed); |
|
37
|
|
|
|
|
97
|
|
|
37
|
|
|
|
|
6916
|
|
8
|
|
|
|
|
|
|
use overload |
9
|
|
|
|
|
|
|
fallback => 1, |
10
|
37
|
100
|
100
|
37
|
|
288
|
'""' => sub { return $_[0]->english . ($_[0]->error && (!ref($_[0]->error) || blessed($_[0]->error)) ? ": " . $_[0]->error : "") . ($_[0]->line ? " on line " . $_[0]->line . ", character " . $_[0]->{line}->[1] . ($_[0]->{line}->[3] ? ", file " . $_[0]->{line}->[3] : '') : ''); }; |
|
37
|
50
|
|
300
|
|
135
|
|
|
37
|
100
|
|
|
|
371
|
|
|
300
|
|
|
|
|
13620
|
|
11
|
332
|
50
|
33
|
332
|
0
|
24399
|
sub line { return $_[0]->{line} ? (ref($_[0]->{line}) && ref($_[0]->{line}) eq "ARRAY" ? $_[0]->{line}->[0] : $_[0]->{line}) : undef; } |
|
|
100
|
|
|
|
|
|
12
|
10
|
50
|
33
|
10
|
0
|
178
|
sub column { return $_[0]->{line} && ref($_[0]->{line}) && ref($_[0]->{line}) eq "ARRAY" ? $_[0]->{line}->[1] : undef; } |
13
|
0
|
|
|
0
|
0
|
0
|
sub stack { return $_[0]->{stack}; } |
14
|
8
|
50
|
|
8
|
0
|
32
|
sub english { return $_[0]->{error} ? $_[0]->{error} : "Unknown Error"; } |
15
|
331
|
|
|
331
|
0
|
1590
|
sub error { return $_[0]->{error}; } |
16
|
|
|
|
|
|
|
|
17
|
37
|
|
|
37
|
|
10479
|
use Devel::StackTrace; |
|
37
|
|
|
|
|
102
|
|
|
37
|
|
|
|
|
1093
|
|
18
|
37
|
|
|
37
|
|
251
|
use Scalar::Util qw(blessed); |
|
37
|
|
|
|
|
104
|
|
|
37
|
|
|
|
|
8117
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub new { |
21
|
30
|
|
|
30
|
0
|
120
|
my ($package, $line, $message) = @_; |
22
|
30
|
|
|
|
|
237
|
my $self = bless { |
23
|
|
|
|
|
|
|
error => $message, |
24
|
|
|
|
|
|
|
stack => Devel::StackTrace->new, |
25
|
|
|
|
|
|
|
}, $package; |
26
|
30
|
100
|
|
|
|
26180
|
if (blessed($line)) { |
27
|
18
|
50
|
100
|
|
|
243
|
if ($line->isa('WWW::Shopify::Liquid::Tag') || $line->isa('WWW::Shopify::Liquid::Token') || $line->isa('WWW::Shopify::Liquid::Operator') || $line->isa('WWW::Shopify::Liquid::Filter')) { |
|
|
|
100
|
|
|
|
|
|
|
|
66
|
|
|
|
|
28
|
18
|
|
|
|
|
560
|
$self->{token} = $line; |
29
|
18
|
|
|
|
|
56
|
$line = $line->{line}; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
} |
32
|
30
|
50
|
66
|
|
|
202
|
if (defined $line && ref($line) ne "ARRAY") { |
33
|
0
|
|
|
|
|
0
|
$self->{error} = $line; |
34
|
0
|
|
|
|
|
0
|
return $self; |
35
|
|
|
|
|
|
|
} |
36
|
30
|
|
|
|
|
271
|
$self->{line} = $line; |
37
|
30
|
|
|
|
|
300
|
return $self; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Timeout; |
41
|
37
|
|
|
37
|
|
308
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
37
|
|
|
|
|
84
|
|
|
37
|
|
|
|
|
5305
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control; |
44
|
37
|
|
|
37
|
|
297
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
37
|
|
|
|
|
115
|
|
|
37
|
|
|
|
|
6471
|
|
45
|
0
|
|
|
0
|
|
0
|
sub english { return "Control exception"; } |
46
|
|
|
|
|
|
|
|
47
|
15
|
100
|
|
15
|
|
36
|
sub initial_render { my $self = shift; $self->{initial_render} = \@_ if int(@_) > 0; return $self->{initial_render}; } |
|
15
|
|
|
|
|
94
|
|
|
15
|
|
|
|
|
65
|
|
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control::Continue; |
50
|
37
|
|
|
37
|
|
285
|
use base 'WWW::Shopify::Liquid::Exception::Control'; |
|
37
|
|
|
|
|
98
|
|
|
37
|
|
|
|
|
11249
|
|
51
|
20
|
|
|
20
|
|
50
|
sub english { return "Continue exception"; } |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control::Break; |
54
|
37
|
|
|
37
|
|
309
|
use base 'WWW::Shopify::Liquid::Exception::Control'; |
|
37
|
|
|
|
|
97
|
|
|
37
|
|
|
|
|
8867
|
|
55
|
20
|
|
|
20
|
|
37
|
sub english { return "Break exception"; } |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control::Pause; |
58
|
37
|
|
|
37
|
|
295
|
use base 'WWW::Shopify::Liquid::Exception::Control'; |
|
37
|
|
|
|
|
94
|
|
|
37
|
|
|
|
|
10910
|
|
59
|
231
|
|
|
231
|
|
678
|
sub english { return "Pause exception"; } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub new { |
62
|
5
|
|
|
5
|
|
82
|
my $self = shift->SUPER::new; |
63
|
5
|
|
|
|
|
17
|
$self->{hash} = $_[1]; |
64
|
5
|
|
|
|
|
15
|
$self->{values} = {}; |
65
|
5
|
|
|
|
|
26
|
$self->register_value($_[0], $_[2]); |
66
|
5
|
|
|
|
|
43
|
return $self; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
37
|
|
|
37
|
|
307
|
use Scalar::Util qw(refaddr); |
|
37
|
|
|
|
|
91
|
|
|
37
|
|
|
|
|
10122
|
|
70
|
|
|
|
|
|
|
sub register_value { |
71
|
17
|
|
|
17
|
|
51
|
my ($self, $element, $value) = @_; |
72
|
17
|
100
|
|
|
|
208
|
$self->{values}->{$element} = $value if !$element->isa('WWW::Shopify::Liquid::Token'); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub value { |
76
|
5
|
|
|
5
|
|
15
|
my ($self, $element, $value) = @_; |
77
|
5
|
50
|
50
|
|
|
29
|
if ((ref($element) || '') eq 'ARRAY') { |
78
|
5
|
50
|
|
|
|
21
|
if (@_ > 2) { |
79
|
5
|
|
|
|
|
24
|
for my $idx (0..(int(@$value)-1)) { |
80
|
0
|
|
|
|
|
0
|
$self->register_value($element->[$idx], $value->[$idx]); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
} |
83
|
5
|
|
|
|
|
16
|
return [map { $self->{values}->{$_} } @$element]; |
|
5
|
|
|
|
|
35
|
|
84
|
|
|
|
|
|
|
} else { |
85
|
0
|
0
|
|
|
|
0
|
$self->register_value($element, $value) if @_ > 2; |
86
|
0
|
|
|
|
|
0
|
return $self->{values}->{$element}; |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer; |
91
|
37
|
|
|
37
|
|
304
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
37
|
|
|
|
|
95
|
|
|
37
|
|
|
|
|
4567
|
|
92
|
0
|
|
|
0
|
|
0
|
sub english { return "Lexer exception"; } |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedBrace; |
95
|
37
|
|
|
37
|
|
315
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
104
|
|
|
37
|
|
|
|
|
9656
|
|
96
|
0
|
|
|
0
|
|
0
|
sub english { return "Unbalanced brace found"; } |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedSingleQuote; |
99
|
37
|
|
|
37
|
|
318
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
99
|
|
|
37
|
|
|
|
|
8388
|
|
100
|
0
|
|
|
0
|
|
0
|
sub english { return "Unbalanced single quote found"; } |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedDoubleQuote; |
103
|
37
|
|
|
37
|
|
293
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
107
|
|
|
37
|
|
|
|
|
8368
|
|
104
|
0
|
|
|
0
|
|
0
|
sub english { return "Unbalanced double quote found"; } |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedControlTag; |
107
|
37
|
|
|
37
|
|
294
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
104
|
|
|
37
|
|
|
|
|
9929
|
|
108
|
|
|
|
|
|
|
sub english { |
109
|
1
|
|
|
1
|
|
6
|
my ($self) = @_; |
110
|
1
|
50
|
|
|
|
7
|
return "Unbalanced control tag '" . $self->{token}->stringify . "' found" if $self->{token}; |
111
|
1
|
|
|
|
|
33
|
return "Unbalanced control tag found"; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedOutputTag; |
115
|
37
|
|
|
37
|
|
296
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
95
|
|
|
37
|
|
|
|
|
8083
|
|
116
|
0
|
|
|
0
|
|
0
|
sub english { return "Unbalanced output tag found"; } |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedLexingHalt; |
119
|
37
|
|
|
37
|
|
295
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
96
|
|
|
37
|
|
|
|
|
8283
|
|
120
|
0
|
|
|
0
|
|
0
|
sub english { return "Unbalanced lexing halter found"; } |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::InvalidSeparator; |
123
|
37
|
|
|
37
|
|
319
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
90
|
|
|
37
|
|
|
|
|
8038
|
|
124
|
0
|
|
|
0
|
|
0
|
sub english { return "Invalid separator during array/hash construction."; } |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::Tag; |
127
|
37
|
|
|
37
|
|
286
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
37
|
|
|
|
|
92
|
|
|
37
|
|
|
|
|
8808
|
|
128
|
0
|
|
|
0
|
|
0
|
sub english { return "Malformed tag " . $_[0]->{message}; } |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser; |
132
|
37
|
|
|
37
|
|
364
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
37
|
|
|
|
|
99
|
|
|
37
|
|
|
|
|
4546
|
|
133
|
0
|
|
|
0
|
|
0
|
sub english { return "Parser exception"; } |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NoClose; |
136
|
37
|
|
|
37
|
|
280
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
100
|
|
|
37
|
|
|
|
|
10502
|
|
137
|
6
|
|
|
6
|
|
35
|
sub english { return "Unable to find closing tag for '" . $_[0]->{token}->stringify . "'"; } |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::Operands; |
140
|
37
|
|
|
37
|
|
294
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
94
|
|
|
37
|
|
|
|
|
11007
|
|
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub new { |
143
|
2
|
|
|
2
|
|
12
|
my $package = shift; |
144
|
2
|
|
|
|
|
24
|
my $self = $package->SUPER::new(@_); |
145
|
2
|
|
|
|
|
10
|
my ($token, $op1, $op, $op2) = @_; |
146
|
2
|
|
|
|
|
11
|
$self->{operands} = [$op1, $op, $op2]; |
147
|
2
|
|
|
|
|
30
|
return $self; |
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
2
|
|
|
2
|
|
20
|
sub english { return "All operands inside an expression must be joined by operators, under most conditions."; } |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NoOpen; |
153
|
37
|
|
|
37
|
|
309
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
111
|
|
|
37
|
|
|
|
|
9562
|
|
154
|
0
|
|
|
0
|
|
0
|
sub english { return "Unable to find opening tag for '" . $_[0]->{token}->stringify . "'"; } |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::Arguments; |
157
|
37
|
|
|
37
|
|
449
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
101
|
|
|
37
|
|
|
|
|
15523
|
|
158
|
|
|
|
|
|
|
sub english { |
159
|
2
|
|
|
2
|
|
10
|
my ($self) = @_; |
160
|
2
|
100
|
66
|
|
|
15
|
if ($self->error && ref($self->error) eq 'ARRAY') { |
161
|
1
|
|
|
|
|
4
|
my ($count, $min, $max) = @{$self->error}; |
|
1
|
|
|
|
|
5
|
|
162
|
1
|
50
|
33
|
|
|
34
|
return "Received $count arguments for '" . $_[0]->{token}->stringify . "', expected " . (defined $max ? ($min == $max ? "exactly $min" : "between $min and $max") : "at least $min") . " arguments" if $_[0]->{token} && $_[0]->{token}->can('stringify'); |
|
|
50
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
163
|
0
|
|
|
|
|
0
|
return "Invalid arguments."; |
164
|
|
|
|
|
|
|
} else { |
165
|
1
|
50
|
33
|
|
|
33
|
return "Invalid arguments for '" . $_[0]->{token}->stringify . "'" if $_[0]->{token} && $_[0]->{token}->can('stringify'); |
166
|
1
|
|
|
|
|
8
|
return "Invalid arguments."; |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::UnknownTag; |
171
|
37
|
|
|
37
|
|
409
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
107
|
|
|
37
|
|
|
|
|
9193
|
|
172
|
4
|
|
|
4
|
|
22
|
sub english { return "Unknown tag '" . $_[0]->{token}->stringify . "'"; } |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NakedInnerTag; |
175
|
37
|
|
|
37
|
|
291
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
100
|
|
|
37
|
|
|
|
|
12970
|
|
176
|
1
|
|
|
1
|
|
10
|
sub english { return "Inner tag " . $_[0]->{token}->stringify . " found without enclosing statement"; } |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::UnknownFilter; |
179
|
37
|
|
|
37
|
|
368
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
37
|
|
|
|
|
95
|
|
|
37
|
|
|
|
|
17718
|
|
180
|
1
|
|
|
1
|
|
4
|
sub english { return "Unknown filter '" . $_[0]->{token}->stringify . "'"; } |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Optimizer; |
183
|
37
|
|
|
37
|
|
295
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
37
|
|
|
|
|
100
|
|
|
37
|
|
|
|
|
4426
|
|
184
|
0
|
|
|
0
|
|
0
|
sub english { return "Optimizer exception"; } |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer; |
187
|
37
|
|
|
37
|
|
281
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
37
|
|
|
|
|
95
|
|
|
37
|
|
|
|
|
4603
|
|
188
|
0
|
|
|
0
|
|
0
|
sub english { return "Rendering exception"; } |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Unimplemented; |
191
|
37
|
|
|
37
|
|
278
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
37
|
|
|
|
|
109
|
|
|
37
|
|
|
|
|
10052
|
|
192
|
4
|
|
|
4
|
|
10
|
sub english { return "Unimplemented method"; } |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Forbidden; |
195
|
37
|
|
|
37
|
|
409
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
37
|
|
|
|
|
138
|
|
|
37
|
|
|
|
|
8412
|
|
196
|
0
|
|
|
0
|
|
|
sub english { return "Forbidden operation"; } |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Wrapped; |
199
|
37
|
|
|
37
|
|
301
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
37
|
|
|
|
|
102
|
|
|
37
|
|
|
|
|
8285
|
|
200
|
0
|
|
|
0
|
|
|
sub english { return "Wrapped internal exception"; } |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Arguments; |
203
|
37
|
|
|
37
|
|
294
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
37
|
|
|
|
|
99
|
|
|
37
|
|
|
|
|
8831
|
|
204
|
0
|
|
|
0
|
|
|
sub english { print STDERR $_[0]->stack->as_string; return "Wrong type? Number of arguments."; } |
|
0
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
1; |