Re: [Templates] Two Template Questions about Calling Objects

[prev] [thread] [next] [Date index for 2005/05/10]

From: Stephen Howard
Subject: Re: [Templates] Two Template Questions about Calling Objects
Date: 14:41 on 10 May 2005
afaik, both lists and hashes are always arrayrefs and hashrefs.  there 
are no 'flat' data structures other than scalars in TT.  Given that, it 
would not make much sense as a default behavior to unref a hash to pass 
it to a function.  since %$hash, iirc, makes a copy of the data 
structure, which could potentially be quite large.

Peter Kay wrote:

>Question 2:
>I want to pass %another_hash from List.tt2 to
>writeHTML().  If I try writeHTML(another_hash), then I
>don't get it as a flat hash ('colour' => 'Green',
>etc...) but as a reference to a hash.  Can I "expand"
>it in any way?
>
>  
>

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Two Template Questions about Calling Objects
merlyn (Randal L. Schwartz) 23:26 on 09 May 2005

Re: [Templates] Two Template Questions about Calling Objects
Stephen Howard 14:41 on 10 May 2005

Generated at 07:01 on 17 May 2005 by mariachi v0.52