[Templates] Syntactical Scalar call
Paul Seamons
mail at seamons.com
Thu Feb 28 18:05:07 GMT 2008
> [% foo.method(bar) %] # normal smart
> [% foo.*method(bar) %] # same thing (mnemonic 0 or more)
I was just putting in the code to handle it in Alloy (really not very bad at
all - I hope TT3 will be easy to hack on too).
I just found another benefit that the .*method call can have - it is almost
the same as .method, but it won't fall back and look for an hash key by that
name if the object is a hashref based object. So if .*method doesn't exist -
then you get a die right then and there - rather than normal .method behavior
which checks if obj->{method} exists.
Paul
More information about the templates
mailing list