Re: [Templates] The Badger Book

2004-01-08 Thread Gavin Estey
On Jan 3, 2004, at 8:40 AM, Andy Wardley wrote: Run, don't walk, to your nearest bookstore and get yourself a copy now! Bookpool now have it stock for $22.75, ordered my copy this morning :) Gavin. ___ templates mailing list [EMAIL PROTECTED] http://lis

Re: [Templates] Version 2.12 released

2004-01-12 Thread Gavin Estey
On Monday, January 12, 2004 12:13 PM, Randal L. Schwartz > > Still horked on the date test: > Tests pass for me with 5.6.1 and 5.8.1 on Linux. I'm on the other side of the pond too. Gavin. ___ templates mailing list [EMAIL PROTECTED] http://lists.temp

[Templates] Accessing "global" vars inside an INCLUDE

2004-05-21 Thread Gavin Estey
I've got a template that uses INCLUDE so the block's variables are localised. However there's a "global" variable I need to update inside the block (to keep track of a count in this instance). I've worked around it by passing a hash to exploit the fact that the localisation isn't a deep copy, but

Re: [Templates] mysql date parsing

2004-06-30 Thread Gavin Estey
You might find Time::Piece::MySQL helpful. See: http://cpan.japh.org/cgi-bin/index.cgi?Time::Piece::MySQL Gavin. Dennis Daupert wrote: > This must have been address before, but a google on: > lists.template-toolkit.org mysql date > gave me no clues. > > I need to display date stored in mysql in

Re: [Templates] Newbie TT2 with CGI or mod_perl2 question?

2004-07-08 Thread Gavin Estey
Mark Mills wrote: > [...] The only real reason I know of to go Apache2 > right now is mod_deflate ... easy bandwidth savings are worth the one > time extra effort to get over the mod_perl2 hump. > Or you could run Apache 1 with mod_gzip http://www.schroepl.net/projekte/mod_gzip/ Gavin. _

Re: [Templates] Foreach LOOP to create HTML

2004-07-20 Thread Gavin Estey
On Jul 20, 2004, at 5:56 PM, Roderick A. Anderson wrote: Seems to me there should be some ultra-slick TT2 method to do this but it escapes me -- even with the Badger book at hand. Is there some already defined method to do this? The Template::Plugin::FillInForm plugin is mighty handy: http://sea

Re: [Templates] XML::Simple, encoding, latin1

2004-07-21 Thread Gavin Estey
Oleg Burlaca wrote: > > [% USE xdoc = XML.Simple(xml_document) %] > title: [% xdoc.title.latin1 %] > ^^ What about a filter: package Blah::Template::Plugin::ForceEncoding; use base qw( Template::Plugin::Filter ); sub filter { my ($self, $text); my $to

Re: [Templates] TT Without Perl

2004-10-01 Thread Gavin Estey
Dave Cross wrote: > Following a discussion on my use.perl journal[1], I'd be really > interested in hearing about anyone who is using TT but not Perl - that > is using templates with tpage, ttree or Apache configured with > Apache::Template (or similar) such that useful applications are > developed

Re: [Templates] TT Without Perl

2004-10-01 Thread Gavin Estey
Stephen Quinney wrote: > That sounds a very interesting project, is any of it open source or > available for perusal? I've been playing with C# for a while and being > able to join it up with TT could be very useful. I wasn't involved in this development, but as far as I know it was pretty straigh

Re: [Templates] Performance on my new site is a drag

2004-10-25 Thread Gavin Estey
Andy Lester wrote: > > We're doing this, and it's working marvelously. Now, what else can I > do > to speed things up? Heck, I'd settle for rudimentary profiling to see > which of the templates is dragging our server down the most. > You can use a Template::Context subclass to insert timing comm

Re: [Templates] Stringifying objects in templates

2004-10-25 Thread Gavin Estey
Drew Taylor wrote: > In the template I wanted to take the stringified class_date object > ("2004-10-25 09:00:00") and split on the white space to get the > individual day and hour components. My first thought was: > > [day, time] = schedule.class_date.split(' '); > What about being explicit an

Re: [Templates] Performance on my new site is a drag

2004-10-25 Thread Gavin Estey
On Oct 25, 2004, at 6:32 PM, Randal L. Schwartz wrote: Ugh. Eval-string. You can eliminate that with this: I blame it on too much coffee... I fixed it with later with: my $super = "SUPER::$sub"; $self->$super(@_); Just proves that there's more than one way to do it :) Gavin. _

Re: [Templates] Looping through numbers

2005-01-03 Thread Gavin Estey
> > [% FOREACH x IN 1..20 %] > : > : > [% END %] > That should be: [% FOREACH x IN [1..20] %] : : [% END %] Gavin. ___ templates mailing list templates@template-toolkit.org http://lists.template-toolkit.org/mailman/listinfo/templates