line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
30
|
|
|
30
|
|
125
|
use strict; |
|
30
|
|
|
|
|
53
|
|
|
30
|
|
|
|
|
835
|
|
3
|
30
|
|
|
30
|
|
129
|
use warnings; |
|
30
|
|
|
|
|
54
|
|
|
30
|
|
|
|
|
1038
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception; |
6
|
30
|
|
|
30
|
|
11985
|
use Devel::StackTrace; |
|
30
|
|
|
|
|
73555
|
|
|
30
|
|
|
|
|
3030
|
|
7
|
|
|
|
|
|
|
use overload |
8
|
|
|
|
|
|
|
fallback => 1, |
9
|
30
|
0
|
|
30
|
|
169
|
'""' => sub { return $_[0]->english . ($_[0]->line ? " on line " . $_[0]->line . ", character " . $_[0]->{line}->[1] . ($_[0]->{line}->[3] ? ", file " . $_[0]->{line}->[3] : '') : ''); }; |
|
30
|
0
|
|
0
|
|
51
|
|
|
30
|
|
|
|
|
265
|
|
|
0
|
|
|
|
|
0
|
|
10
|
0
|
0
|
0
|
0
|
0
|
|
sub line { return $_[0]->{line} ? (ref($_[0]->{line}) && ref($_[0]->{line}) eq "ARRAY" ? $_[0]->{line}->[0] : $_[0]->{line}) : undef; } |
|
|
0
|
|
|
|
|
|
11
|
0
|
0
|
0
|
0
|
0
|
|
sub column { return $_[0]->{line} && ref($_[0]->{line}) && ref($_[0]->{line}) eq "ARRAY" ? $_[0]->{line}->[1] : undef; } |
12
|
0
|
|
|
0
|
0
|
|
sub stack { return $_[0]->{stack}; } |
13
|
0
|
0
|
|
0
|
0
|
|
sub english { return $_[0]->{error} ? $_[0]->{error} : "Unknown Error"; } |
14
|
0
|
|
|
0
|
0
|
|
sub error { return $_[0]->{error}; } |
15
|
|
|
|
|
|
|
|
16
|
30
|
|
|
30
|
|
7346
|
use Devel::StackTrace; |
|
30
|
|
|
|
|
49
|
|
|
30
|
|
|
|
|
695
|
|
17
|
30
|
|
|
30
|
|
123
|
use Scalar::Util qw(blessed); |
|
30
|
|
|
|
|
62
|
|
|
30
|
|
|
|
|
6714
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
0
|
|
|
0
|
0
|
|
my ($package, $line, $message) = @_; |
21
|
0
|
|
|
|
|
|
my $self = bless { |
22
|
|
|
|
|
|
|
error => $message, |
23
|
|
|
|
|
|
|
stack => Devel::StackTrace->new, |
24
|
|
|
|
|
|
|
}, $package; |
25
|
0
|
0
|
|
|
|
|
if (blessed($line)) { |
26
|
0
|
0
|
0
|
|
|
|
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')) { |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
27
|
0
|
|
|
|
|
|
$self->{token} = $line; |
28
|
0
|
|
|
|
|
|
$line = $line->{line}; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
0
|
0
|
0
|
|
|
|
if (defined $line && ref($line) ne "ARRAY") { |
32
|
0
|
|
|
|
|
|
print STDERR $self->stack->as_string . "\n"; |
33
|
0
|
|
|
|
|
|
die "Improper exception."; |
34
|
|
|
|
|
|
|
} |
35
|
0
|
|
|
|
|
|
$self->{line} = $line; |
36
|
0
|
|
|
|
|
|
return $self; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Timeout; |
40
|
30
|
|
|
30
|
|
658
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
30
|
|
|
|
|
64
|
|
|
30
|
|
|
|
|
2846
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control; |
43
|
30
|
|
|
30
|
|
183
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
30
|
|
|
|
|
42
|
|
|
30
|
|
|
|
|
4132
|
|
44
|
0
|
|
|
0
|
|
|
sub english { return "Control exception"; } |
45
|
|
|
|
|
|
|
|
46
|
0
|
0
|
|
0
|
|
|
sub initial_render { my $self = shift; $self->{initial_render} = \@_ if int(@_) > 0; return $self->{initial_render}; } |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control::Continue; |
49
|
30
|
|
|
30
|
|
154
|
use base 'WWW::Shopify::Liquid::Exception::Control'; |
|
30
|
|
|
|
|
52
|
|
|
30
|
|
|
|
|
11049
|
|
50
|
0
|
|
|
0
|
|
|
sub english { return "Continue exception"; } |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Control::Break; |
53
|
30
|
|
|
30
|
|
163
|
use base 'WWW::Shopify::Liquid::Exception::Control'; |
|
30
|
|
|
|
|
43
|
|
|
30
|
|
|
|
|
9202
|
|
54
|
0
|
|
|
0
|
|
|
sub english { return "Break exception"; } |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer; |
57
|
30
|
|
|
30
|
|
179
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
30
|
|
|
|
|
51
|
|
|
30
|
|
|
|
|
2872
|
|
58
|
0
|
|
|
0
|
|
|
sub english { return "Lexer exception"; } |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedBrace; |
61
|
30
|
|
|
30
|
|
138
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
49
|
|
|
30
|
|
|
|
|
9830
|
|
62
|
0
|
|
|
0
|
|
|
sub english { return "Unbalanced brace found"; } |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedSingleQuote; |
65
|
30
|
|
|
30
|
|
174
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
41
|
|
|
30
|
|
|
|
|
8681
|
|
66
|
0
|
|
|
0
|
|
|
sub english { return "Unbalanced single quote found"; } |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedDoubleQuote; |
69
|
30
|
|
|
30
|
|
162
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
47
|
|
|
30
|
|
|
|
|
8638
|
|
70
|
0
|
|
|
0
|
|
|
sub english { return "Unbalanced double quote found"; } |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedTag; |
73
|
30
|
|
|
30
|
|
156
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
46
|
|
|
30
|
|
|
|
|
8219
|
|
74
|
0
|
|
|
0
|
|
|
sub english { return "Unbalanced tag found"; } |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedOutputTag; |
77
|
30
|
|
|
30
|
|
161
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
41
|
|
|
30
|
|
|
|
|
8432
|
|
78
|
0
|
|
|
0
|
|
|
sub english { return "Unbalanced output tag found"; } |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::UnbalancedLexingHalt; |
81
|
30
|
|
|
30
|
|
156
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
50
|
|
|
30
|
|
|
|
|
8523
|
|
82
|
0
|
|
|
0
|
|
|
sub english { return "Unbalanced lexing halter found"; } |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::InvalidSeparator; |
85
|
30
|
|
|
30
|
|
170
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
42
|
|
|
30
|
|
|
|
|
8179
|
|
86
|
0
|
|
|
0
|
|
|
sub english { return "Invalid separator during array/hash construction."; } |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Lexer::Tag; |
89
|
30
|
|
|
30
|
|
143
|
use base 'WWW::Shopify::Liquid::Exception::Lexer'; |
|
30
|
|
|
|
|
35
|
|
|
30
|
|
|
|
|
8573
|
|
90
|
0
|
|
|
0
|
|
|
sub english { return "Malformed tag " . $_[0]->{message}; } |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser; |
94
|
30
|
|
|
30
|
|
152
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
30
|
|
|
|
|
41
|
|
|
30
|
|
|
|
|
2681
|
|
95
|
0
|
|
|
0
|
|
|
sub english { return "Parser exception"; } |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NoClose; |
98
|
30
|
|
|
30
|
|
153
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
46
|
|
|
30
|
|
|
|
|
10230
|
|
99
|
0
|
|
|
0
|
|
|
sub english { return "Unable to find closing tag for '" . $_[0]->{token}->stringify . "'"; } |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::Operands; |
102
|
30
|
|
|
30
|
|
158
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
42
|
|
|
30
|
|
|
|
|
10502
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub new { |
105
|
0
|
|
|
0
|
|
|
my $package = shift; |
106
|
0
|
|
|
|
|
|
my $self = $package->SUPER::new(@_); |
107
|
0
|
|
|
|
|
|
my ($token, $op1, $op, $op2) = @_; |
108
|
0
|
|
|
|
|
|
$self->{operands} = [$op1, $op, $op2]; |
109
|
0
|
|
|
|
|
|
return $self; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
0
|
|
|
0
|
|
|
sub english { return "All operands inside an expression must be joined by operators, under most conditions."; } |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NoOpen; |
115
|
30
|
|
|
30
|
|
157
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
44
|
|
|
30
|
|
|
|
|
9345
|
|
116
|
0
|
|
|
0
|
|
|
sub english { return "Unable to find opening tag for '" . $_[0]->{token}->stringify . "'"; } |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::Arguments; |
119
|
30
|
|
|
30
|
|
163
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
41
|
|
|
30
|
|
|
|
|
8163
|
|
120
|
0
|
|
|
0
|
|
|
sub english { return "Invalid arguments"; } |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::UnknownTag; |
123
|
30
|
|
|
30
|
|
150
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
58
|
|
|
30
|
|
|
|
|
8802
|
|
124
|
0
|
|
|
0
|
|
|
sub english { return "Unknown tag '" . $_[0]->{token}->stringify . "'"; } |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::NakedInnerTag; |
127
|
30
|
|
|
30
|
|
154
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
41
|
|
|
30
|
|
|
|
|
8842
|
|
128
|
0
|
|
|
0
|
|
|
sub english { return "Inner tag " . $_[0]->{token}->stringify . " found without enclosing statement"; } |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Parser::UnknownFilter; |
131
|
30
|
|
|
30
|
|
141
|
use base 'WWW::Shopify::Liquid::Exception::Parser'; |
|
30
|
|
|
|
|
61
|
|
|
30
|
|
|
|
|
8666
|
|
132
|
0
|
|
|
0
|
|
|
sub english { return "Unknown filter '" . $_[0]->{token}->stringify . "'"; } |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Optimizer; |
135
|
30
|
|
|
30
|
|
164
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
30
|
|
|
|
|
36
|
|
|
30
|
|
|
|
|
2637
|
|
136
|
0
|
|
|
0
|
|
|
sub english { return "Optimizer exception"; } |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer; |
139
|
30
|
|
|
30
|
|
162
|
use base 'WWW::Shopify::Liquid::Exception'; |
|
30
|
|
|
|
|
56
|
|
|
30
|
|
|
|
|
2561
|
|
140
|
0
|
|
|
0
|
|
|
sub english { return "Rendering exception"; } |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Unimplemented; |
143
|
30
|
|
|
30
|
|
166
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
30
|
|
|
|
|
55
|
|
|
30
|
|
|
|
|
10106
|
|
144
|
0
|
|
|
0
|
|
|
sub english { return "Unimplemented method"; } |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
package WWW::Shopify::Liquid::Exception::Renderer::Arguments; |
147
|
30
|
|
|
30
|
|
164
|
use base 'WWW::Shopify::Liquid::Exception::Renderer'; |
|
30
|
|
|
|
|
54
|
|
|
30
|
|
|
|
|
9382
|
|
148
|
0
|
|
|
0
|
|
|
sub english { print STDERR $_[0]->stack->as_string; return "Wrong type? Number of arguments."; } |
|
0
|
|
|
|
|
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
1; |