Andy Wardley <[EMAIL PROTECTED]> writes:

> On Fri, Aug 17, 2001 at 05:21:36AM +0200, Jonas Liljegren wrote:
> > The import() function/method is not enough.  It would be better if
> > .import (without parameters) would import to the current namespace.
> 
> It does:
> 
>   [% import(myhash) %]
> 
> (you don't need the leading '.')

Yes. But that leads to extra parantheses.  In combination with
functions it woudl lead to

  [% import( function('argument', arg2(var)) ) %]

That's one paranthesis to much.  Comare with this:

  [% IMPORT function('argument', arg2(var)) %]


>   [% myhash.import %]
> 
> meaning "import values of myhash into the root".  In one, myhash is the
> subject, in the other it's the object.  

Ah. Yes.  I thought it was the other way around.� The documentation
only explains the direction if you analyze the example.  It doesn't
say it in the general description:

        The import method can be called on a hash array to import the
        contents of another hash array.

Ok. It's clear.  But I misinterpretaded it because I was looking for a
way to do the reverse.

To be specific: I wanted to import the result of a query; a single
row, into the root.


-- 
/ Jonas  -  http://jonas.liljegren.org/myself/en/index.html


Reply via email to