Linked from the Inqirer this morning...
http://www.strangehorizons.com/2004/20040405/badger.shtml
Andrew
___
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates
Thank heavens that Andy put lots of snippets of code in
his examples. Looking at other people's code is very much
part of my learning process.
I'm new to tt2, and new to OO programming in general. There
is a paradigm shift that I'm still wrapping my mind around.
Questions:
There is a ton of per
Personally, I learned a LOT about TT through Bugzilla. A couple jobs ago
I had maintain & customize our bugzilla system, so I was armpit-deep in
both the code & the templates. The second biggest help was reading the
badger book. I was in the middle of writing a request ticker system, and
after
>From perltoot:
An object is nothing but a way of tucking away complex behaviours into a neat
little easy-to-use bundle. [...] Users (well, programmers) can play with this
little bundle all they want, but they aren't to open it up and mess with the
insides. Just like an expensive piece of hard
I realize that it's somewhat un-perl, but is there a way to do "in"
within TT? It would be nice to keep things clean when I have large
lists of things I'm comparing a single variable to in an if-statement.
[% IF var == 'foo' || var == 'bar' %]
I've tried to use something like:
[% IF [ 'foo'
Chris Petersen wrote:
> I realize that it's somewhat un-perl, but is there a way to do "in"
> within TT? It would be nice to keep things clean when I have large
> lists of things I'm comparing a single variable to in an if-statement.
>
> [% IF var == 'foo' || var == 'bar' %]
>
> I've tried t
>How about [% IF foo.match('(foo|bar)') %] ?
And of course by foo.match I meant var.match.
--
Drew Marold - [EMAIL PROTECTED]
Perl programmer, bass player, luthier, Gentleman Adventurer
Photography: http://www.flickr.com/photos/unstoppabledrew/
Nothing looks worse on your outdoors resume than
How about [% IF foo.match('(foo|bar)') %] ?
Drew
Chris Petersen wrote:
> I realize that it's somewhat un-perl, but is there a way to do "in"
> within TT? It would be nice to keep things clean when I have large
> lists of things I'm comparing a single variable to in an if-statement.
>
On Mar 5, 2008, at 12:40 PM, Andrew Marold wrote:
> How about [% IF foo.match('(foo|bar)') %] ?
That would work, assuming you added anchors to the regex and I'm only
ever matching against static lists and not pre-defined variables
(which in this case is the likely scenario).. but would also r
On Wed, Mar 5, 2008 at 2:46 PM, Chris Petersen <[EMAIL PROTECTED]>
wrote:
> On Mar 5, 2008, at 12:40 PM, Andrew Marold wrote:
> > How about [% IF foo.match('(foo|bar)') %] ?
>
> That would work, assuming you added anchors to the regex and I'm only
> ever matching against static lists and not pre-d
Yes I would have to agree. Purchase the Badger Book.
Andy has written an excellent section on creating site mapping.
Although a little hard to wrap your head around at first, VERY streamlined
and efficient once you do.
As well as MANY other great examples!
On Wed, Mar 5, 2008 at 12:43 PM, She
After upgrading to 2.19, if I have a template (down in my .templates
directory) and a directory at the top level of my source with the same
name, I'm getting an error like:
! file error - foo: Permission denied
I'm not sure when this changed, but it seems like a bug to me. Any
work-aroun
12 matches
Mail list logo