On Sun, Aug 01, 2004 at 05:16:37PM +0100, Dan Thomas wrote:
> 
> Interestingly, looking at the source also indicates that the endform
> method is aware of whether you're expecting an array or a string.. It
> could be that TT2 has a quirk relating to the wantarray() fuction when
> calling methods.. 

This sounds like revelant: 

Taken from Release/TODO.html:

        " * Stas Bekman raised the issue of the Stash not being able to correctly
  differentiate between scalar/list context and in particular, the 
  cgi.param examples not working as expected.  This is fixed in v3 and 
  in Craig's Stash/Context.pm which does the right lookahead to allow
  'scalar' and 'list' postfix operators.  e.g. cgi.param.list"

Dan, as a work-around  to the "<div></div>" thing (while sending stuff):

- [% cgi.end_form.join('') %] # dump everything in @_   
- [% cgi.end_form.shift %]        # shift the first value and returns it (<div>)
- [% cgi.end_form.pop   %]        # pop the last value in @_ (i.e.: </form>)

> Dan

        Best regards,
        erob


_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to