-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
258 lines (215 loc) · 8.92 KB
/
Copy pathREADME
File metadata and controls
258 lines (215 loc) · 8.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
UPDATE 2012-01-13
=================
Andy Wardley seems to have solved the issue in the following commit:
https://github.com/abw/Template2/commit/cb1d793924ac105c188c2a573b7233621a6c5e24
Now I guess it's just a matter of waiting for a new release. 2.22_1 seems to
be golden.
-- robinsmidsrod
OLD INFORMATION BELOW
=====================
There seems to be a problem with DateTime being used by Template Toolkit.
I'm not sure if the bug is in Template or in DateTime, but so far I've been
able to narrow it down to the fact that the system that breaks has the
following characteristics:
* Architecture is 64-bit
* The XS stash is used
* Distribution is Debian, Ubuntu, SuSE or MacOSX 10.4.11 (works on CentOS)
The problem is that when I try to access the DateTime variable in the
template, the process exits without any error message. It doesn't die in a
trappable way, it just exits.
References / more information:
https://rt.cpan.org/Ticket/Display.html?id=47032
https://rt.cpan.org/Ticket/Display.html?id=48020
https://rt.cpan.org/Ticket/Display.html?id=47929
http://github.com/abw/TT-XS-Stash-DateTime/tree/master
------------------------------------------------------------------------------
Confirmed working on:
From robin@smidsrod.no:
Description: Ubuntu 10.04.3 LTS
Linux server 2.6.32-36-generic-pae #79-Ubuntu SMP Tue Nov 8 23:25:26 UTC
2011 i686 GNU/Linux
This is perl 5, version 12, subversion 2 (v5.12.2) built for i686-linux
POSIX version: 1.19
DateTime version: 0.66
Template version: 2.22_1 (commit bb1080b)
Template stash used: Template::Stash::XS
Description: Ubuntu 10.04.3 LTS
Linux server 2.6.32-36-generic-pae #79-Ubuntu SMP Tue Nov 8 23:25:26 UTC
2011 i686 GNU/Linux
This is perl 5, version 14, subversion 0 (v5.14.0) built for i686-linux
POSIX version: 1.24
DateTime version: 0.72
Template version: 2.22_1 (commit bb1080b)
Template stash used: Template::Stash::XS
Description: Ubuntu 8.10
Linux server 2.6.27-14-server #1 SMP Wed Apr 15 19:44:38 UTC 2009 i686 GNU/Linux
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
POSIX version: 1.13
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
Description: Ubuntu 8.04.2
Linux gm 2.6.24-24-generic #1 SMP Wed Apr 15 15:54:25 UTC 2009 i686 GNU/Linux
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
POSIX version: 1.09
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
Description: Ubuntu 8.04.2
Linux pf 2.6.24-24-server #1 SMP Wed Apr 15 15:41:09 UTC 2009 x86_64 GNU/Linux
This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
POSIX version: 1.09
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash
OS: Windows Vista Business x64 w/ strawberry-perl 5.10.0.5
This is perl, v5.10.0 built for MSWin32-x86-multi-thread
POSIX version: 1.13
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
From ash in #tt@irc.perl.org:
Description: Ubuntu 9.04
Linux cambridge 2.6.28-11-generic #42-Ubuntu SMP Fri Apr 17 01:57:59 UTC 2009 i686 GNU/Linux
This is perl, v5.8.8 built for i686-linux
POSIX version: 1.09
DateTime version: 0.4302
Template version: 2.20
Template stash used: Template::Stash::XS
Description: CentOS release 5.2 (Final)
Linux foo 2.6.18-92.1.6.el5xen #1 SMP Wed Jun 25 14:13:10 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
This is perl, v5.8.8 built for x86_64-linux-thread-multi
POSIX version: 1.09
DateTime version: 0.4304
Template version: 2.19
Template stash used: Template::Stash::XS
From Dave Howorth <dhoworth@mrc-lmb.cam.ac.uk>:
Description: SuSE Linux 9.2 (x86-64)
Linux suse3 2.6.8-24.14-smp #1 SMP Tue Mar 29 09:27:43 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux
This is perl, v5.8.5 built for x86_64-linux-thread-multi
POSIX version: 1.08
DateTime version: 0.29
Template version: 2.14
From Frank Wiegand <frank@planet-interview.de>:
Description: Debian GNU/Linux testing (squeeze)
Linux hal2 2.6.26-2-amd64 #1 SMP Fri Mar 27 04:02:59 UTC 2009 x86_64 GNU/Linux
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
POSIX version: 1.13
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash
From jhannah in #perl-help@irc.perl.org:
OS: SUSE Linux Enterprise Server 10 (i586)
Linux dev 2.6.16.54-0.2.3-default #1 Thu Nov 22 18:32:07 UTC 2007 i686 i686 i386 GNU/Linux
This is perl, v5.8.8 built for i586-linux-thread-multi
POSIX version: 1.09
DateTime version: 0.42
Template version: 2.20
Template stash used: Template::Stash::XS
------------------------------------------------------------------------------
Confirmed broken on:
From robin@smidsrod.no:
Description: Ubuntu 8.04.2
Linux pf 2.6.24-24-server #1 SMP Wed Apr 15 15:41:09 UTC 2009 x86_64 GNU/Linux
This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
POSIX version: 1.09
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
From Frank Wiegand <frank@planet-interview.de>:
Description: Debian GNU/Linux testing (squeeze)
Linux hal2 2.6.26-2-amd64 #1 SMP Fri Mar 27 04:02:59 UTC 2009 x86_64 GNU/Linux
This is perl, v5.10.0 built for x86_64-linux-gnu-thread-multi
POSIX version: 1.13
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
From jhannah in #perl-help@irc.perl.org:
OS: MacOS X 10.4.11
Darwin Hannah-Mac-Mini-2.local 8.11.1 Darwin Kernel Version 8.11.1: Wed Oct 10 18:23:28 PDT 2007; root:xnu-792.25.20~1/RELEASE_I386 i386 i386
This is perl, v5.8.6 built for darwin-thread-multi-2level
POSIX version: 1.08
DateTime version: 0.50
Template version: 2.14
Template stash used: Template::Stash::XS
OS: SUSE Linux Enterprise Server 10.2 (x86_64)
Linux omares-omnihubdr1 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
This is perl, v5.8.8 built for x86_64-linux-thread-multi
POSIX version: 1.09
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
------------------------------------------------------------------------------
Program run with Template->new({ DEBUG => 'all });
Version information:
Description: Ubuntu 8.04.2
Linux pf 2.6.24-24-server #1 SMP Wed Apr 15 15:41:09 UTC 2009 x86_64 GNU/Linux
This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
[Template::Provider] creating cache of unlimited slots for [ . ]
[Template::Service] process(SCALAR(0xc55ca0), HASH(0x604f10))
[Template::Context] template(SCALAR(0xc55ca0))
[Template::Context] asking providers for [SCALAR(0xc55ca0)] []
[Template::Provider] _load(SCALAR(0xc55ca0), <no alias>)
[Template::Provider] _compile(HASH(0xd71ef0), <no compfile>)
[Template::Parser] compiled main template document block:
sub {
my $context = shift || die "template sub called without context\n";
my $stash = $context->stash;
my $output = '';
my $_tt_error;
eval { BLOCK: {
$output .= "Starting POSIX test...\nCurrent timestamp: ";
#line 2 "input text"
$output .= $context->debugging('msg', { 'line' => '2', 'text' => 'now_posix', 'file' => 'input text' }); ## DEBUG ##
#line 2 "input text"
$output .= $stash->get('now_posix');
$output .= "\nFinished POSIX test.\n";
} };
if ($@) {
$_tt_error = $context->catch($@, \$output);
die $_tt_error unless $_tt_error->type eq 'return';
}
return $output;
}
[Template::Service] PROCESS: Template::Document=HASH(0xeeeb50)
[Template::Context] process([ Template::Document=HASH(0xeeeb50) ], <no params>, <unlocalized>)
[Template::Context] template(Template::Document=HASH(0xeeeb50))
[Template::Service] process(SCALAR(0xc55cd0), HASH(0x604f10))
[Template::Context] template(SCALAR(0xc55cd0))
[Template::Context] asking providers for [SCALAR(0xc55cd0)] []
[Template::Provider] _load(SCALAR(0xc55cd0), <no alias>)
[Template::Provider] _compile(HASH(0xd71fd0), <no compfile>)
[Template::Parser] compiled main template document block:
sub {
my $context = shift || die "template sub called without context\n";
my $stash = $context->stash;
my $output = '';
my $_tt_error;
eval { BLOCK: {
$output .= "Starting DateTime test...\nCurrent timestamp: ";
#line 2 "input text"
$output .= $context->debugging('msg', { 'line' => '2', 'text' => 'now_dt', 'file' => 'input text' }); ## DEBUG ##
#line 2 "input text"
$output .= $stash->get('now_dt');
$output .= "\nFinished DateTime test.\n";
} };
if ($@) {
$_tt_error = $context->catch($@, \$output);
die $_tt_error unless $_tt_error->type eq 'return';
}
return $output;
}
[Template::Service] PROCESS: Template::Document=HASH(0xeeead0)
[Template::Context] process([ Template::Document=HASH(0xeeead0) ], <no params>, <unlocalized>)
[Template::Context] template(Template::Document=HASH(0xeeead0))
POSIX version: 1.09
DateTime version: 0.50
Template version: 2.20
Template stash used: Template::Stash::XS
------------------------------
Starting POSIX test...
Current timestamp:
## input text line 2 : [% now_posix %] ##
2009-06-17T13:06:53
Finished POSIX test.
The bug is present if you don't see any output after this line.