Re: [Templates] problem with CGI

[prev] [thread] [next] [Date index for 2004/08/06]

From: erob
Subject: Re: [Templates] problem with CGI
Date: 14:29 on 06 Aug 2004
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
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] problem with CGI
erob 13:20 on 01 Aug 2004

Re: [Templates] problem with CGI
Dan Thomas 14:10 on 01 Aug 2004

Re: [Templates] problem with CGI
erob 15:36 on 01 Aug 2004

Re: [Templates] problem with CGI
erob 14:29 on 06 Aug 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52