On Wed, Apr 6, 2011 at 6:57 PM, Lyle <webmas...@cosmicperl.com> wrote:
> On 06/04/2011 23:37, Brad Baxter wrote:
> ...
> So my complaint is that my perl code is setting the
> same values in the $tmpl object, but the module
> does not "honor" the value unless it sees the loop
> in the template a certain way.  My explanation is
> confusing, I know -- the whole situation is confusing
> (to me).  And that's what made me have to say
> enough finally after running into this multiple times.
>
> I think using the term object here is confusing. I gather you are talking
> about the scoping of variables? Such the loop variables should be within the
> scope (probably optionally) of child loops?

Yes, and yes (I think).  :-)

I use the term "object", because it is in fact an object.
And I'm used to setting values in objects and expecting
them to be there when I look back at them.

Typically these values are object attributes.  In H::T these
values are "variables" with "scopes".

An that's where my mental picture of setting values in
objects and H::T's implementation diverge. I want to
set "values" in the template "object" regardless of
what the "template" looks like, but H::T will choose
not to set some values if there isn't a scope for them
defined in the template.  And by default, it will die in
those cases.

Not to belabor the issue, the bottom line (ignoring speed)
comes down to inheritance, which I can't do in H::T as it
stands, because I want to define a parent template object
that contains *only* values (loops and vars) and doesn't
have a template at all.

__
Brad

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to