[Catalyst] sporadical error in template parsing

Gerrit Wichert gw at green-stores.de
Wed Jul 15 12:50:52 GMT 2009


i just encountered a sporadical error when trying to render this tt2
template code:

file message.tt2:
[% META title = 'Catalyst/TT View!' %]
  <span class="message">[% message %]</span>

[% IF Catalyst.request.referer %]
<p><a href="[% Catalyst.request.referer %]">zurück</a></p>
[% END -%]   

catalyst gave me the following error message:

 Couldn't render template "file error - parse error - message.tt2 line
7: Assertion rx->sublen >= (s - rx->subbeg) + i failed: file
"regcomp.c", line 5109 at
line 149."   

sub text {
    my ($class, $text) = @_;
    for ($text) {
        s/(["\$\@\\])/\\$1/g;     #<--this is the offending line in
    return '"' . $text . '"';

Im a little bit lost with this. The error dosen't happen on every call
(maybe because im using HTTP::Prefork).
When puttin in spaces arund the word 'zurück' in line 7 all seems to
work properly.
For me this seems to be  an issue with the perl regex engine. Am i right
with this guess?

Im using a precompiled perl v10.0.0 on a suse 11.1 linux.

Don't know if this is the right place for this message but maybe someone
here is interessted in this issue or can verify it or even push it into
the right channels.


Gerrit Wichert

More information about the Catalyst mailing list