See the following diff for the package HTML::Template::JIT::Compiler 0.01.
84c84
< use Inline C => <<CODE_END;
---
> use Inline C => <<'CODE_END';
Perl will treat the string like in ' ' and won't extrapolate the variables like in " ".
399,402c400,403
< $_[0] =~ s/"/\\\\"/g;
< $_[0] =~ s/\r/\\\\r/g;
< $_[0] =~ s/\n/\\\\n/g;
< $_[0] =~ s/\t/\\\\t/g;
---
> $_[0] =~ s/"/\\"/g;
> $_[0] =~ s/\r/\\r/g;
> $_[0] =~ s/\n/\\n/g;
> $_[0] =~ s/\t/\\t/g;
For that reason we do not have to quote so much and expressions like user@server are
safe in the template.
359a360
> $string .= ' '; $string = join( "\"\n \"", $string =~
>/.{1,80}(?<!\\)/g );
I found another bug while playing with JIT-compiled templates. Some templates have a
large amount of text between two <tmpl_*> tags. This results in a very long line in
the C source.
sv_catpvn(result, "bla bla\n bla bla\n ......... bla bla", 5303); <- very long line
My compiler has probably some limit because it failed to compile that file. Therefore
I added the line above to the function _concat_string in order to split the text in
more lines while avoiding backslashes to be at the end of the line.
Please, consider these modifications.
-- Petr Smejkal
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]