On Mon, 3 Feb 2003, darren chamberlain wrote:

> snip example

I tend to use fully qualified variable names, but that's a style thing.

> While we're at it, I'd also like to see an official method to add
> virtual methods to a stash;

I think it'd be a nice idea to make this an interface anyway.  You just
have to look at the extending the template toolkit slides[1] to see that
the virtual method bit is the hardest to extend.

There's some tricky cases that you can get wrong if you're not careful -
for example, adding a virtual method to a list and then not supplying a
similar method for a scalar (to DTRT when a object method returns a one
element list.)  This could be automated with the interface.

> localisation

The VMETHODs in the stash could be localised in exactly the same way as
the current stash itself is.  I'm not sure about the performance penalty
this would impose though, so you'd want to test it.  As you say, it's not
really a trivial change and it's something to put in TODO rather than rush
into...

Mark

[1] http://2shortplanks.com/talks/yapce2002/ettt.pdf (slide 27ish)

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, [EMAIL PROTECTED], http://twoshortplanks.com/};

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates

Reply via email to