Re: [Templates] Pass through perl?

[prev] [thread] [next] [Date index for 2004/07/17]

From: Simon Wistow
Subject: Re: [Templates] Pass through perl?
Date: 06:21 on 17 Jul 2004
> Any other suggestions for translating a lot of random perl code into TT
> without rewriting a perl interpreter?

I'm not entirely sure what you means but you may want to look at the 
PERL and RAWPERL sections of this

http://www.template-toolkit.org/docs/plain/Manual/Directives.html#Filters_Plugins_Macros_and_Perl

> We've also ran into the fact that gt ge lt and le aren't supported,
> among other similar seemingly "not supported" issues.

Are you saying that

	[% IF var1 >= var2 %]

and

	[% IF var1 <= var2 %]

don't work for you?


> [% IF {$self->{PRODUCT_AVAILABLE}->{'gold-1'}} {gt} foo %]
> and have it appear as something like
> if($self->{PRODUCT_AVAILABLE}->{'gold-1'} gt $stash->GET('foo')) {

Andy may correct me here but to do that I suspect you'd have to subclass 
the Template::Document module and instead of evaluating the Perl 
generated, print it out. 

I hope that helps. I confess to being a little confused but it's 7am and 
I'm hungover so I'm hardly in the best shape :)

Simon



_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Pass through perl?
Chris Huegle 01:48 on 17 Jul 2004

Re: [Templates] Pass through perl?
Simon Wistow 06:21 on 17 Jul 2004

Re: [Templates] Pass through perl?
Chris Huegle 18:21 on 19 Jul 2004

Re: [Templates] Pass through perl?
Dave Howorth 11:30 on 20 Jul 2004

Re: [Templates] Pass through perl?
Chris Huegle 19:08 on 20 Jul 2004

Re: [Templates] Pass through perl?
Andy Wardley 07:52 on 21 Jul 2004

Re: [Templates] Pass through perl?
Dave Howorth 09:13 on 21 Jul 2004

Re: [Templates] Pass through perl?
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 08:59 on 05 Aug 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52