[Templates] getting rid of auto ident
Fagyal Csongor
concept@conceptonline.hu
Fri, 17 Nov 2006 22:03:19 +0100 (CET)
> Which TT version are you using.
>
> I get the following with:
>
> [% PERL %]
>
> my $x =3D <<BAR;
> foo
> Lets put some long text here.
> Hrm
> baz
> BAR
>
> print $x;
>
> [% END %]
>
> It caches the following:
>
> $output .=3D "\n\nmy \$x =3D <<BAR;\nfoo\nLets put some long text =
here.
> \nHrm\nbaz\nBAR\n\nprint \$x;\n\n";
>
> That is using TT version 2.14. So it appears to be fixed in recent
> versions.
>
> If you are using a recent version - what parameters are you initializin=
g
> TT with?
I am using 2.15, but got the same with 2.14 I think...
I have just tried this (similar problem):
[% SET a =3D "
adsf
adsf
"
%]
Gives me:
$stash->set('a', '
adsf
adsf
');
$output .=3D "\n\n";
Once again the whitespaces...
Here is how I init the stuff (it is a bit complicated as it sits in the
middle of my perl application server...)
use Template;
$Template::Config::STASH =3D 'Template::Stash::XS';
our $TCONFIG =3D {
'COMPILE_EXT' =3D> '.comp',
'EVAL_PERL' =3D> 1,
'ABSOLUTE' =3D> 1,
};
$TCONFIG->{'INCLUDE_PATH'} =3D $DOCROOT;
$TCONFIG->{'COMPILE_DIR'} =3D "$BASEPATH/compiled";
$TCONFIG->{'INTERPOLATE'} =3D
$GCONF->{'general'}->{'template'}->{'interpolate'};
$TEMPLATE =3D Template->new($TCONFIG);
I have:
- v5.8.8 built for i386-linux-thread-multi
- 2.6.18-1.2798.fc6 #1 SMP i686 i686 i386 GNU/Linux
- Csongor