I don't think it's making an anonymous block ... I think it's evaluating the block and assigning a string to some_name, which you can then print. It's not like some_name is a subroutine.
On Wed, May 8, 2013 at 5:05 PM, Summer <crazysummer2...@yahoo.com> wrote: > well, it won't work that way because I am using it as an anonymous block.. > ie. > > [% > some_name = BLOCK; > # ton of data > END; > %] > > If I try to call it like so: PROCESS some_name, I get a stack trace which > complains about that block not existing. > > The way you propose would be the standard block declaration: > > BLOCK some_name; > > END; > > That will work, but the problem is I don't want to process all that info > again. I want to process it once then display that output 'n' number of > times... except one of those times, I want some data omitted. > > thanks > > ------------------------------ > *From:* Larry Leszczynski <lar...@emailplus.org> > *To:* templates@template-toolkit.org > *Sent:* Wednesday, May 8, 2013 4:49 PM > *Subject:* Re: [Templates] somevar = BLOCK and passing switches > > Hi Summer - > > > [% some_name; token_to_omit =1 %] > > > > some_name does not respect that variable "token_to_omit" > > Did you try: > > [% PROCESS some_name token_to_omit=1 %] > > (No semicolon after "some_name".) > > http://www.template-toolkit.org/docs/manual/Directives.html#section_BLOCK > > > HTH, > Larry > > _______________________________________________ > templates mailing list > templates@template-toolkit.org > http://mail.template-toolkit.org/mailman/listinfo/templates > > > > _______________________________________________ > templates mailing list > templates@template-toolkit.org > http://mail.template-toolkit.org/mailman/listinfo/templates > > -- Check out my LEGO blog at brickpile.com <http://www.brickpile.com/> Follow/friend me: Facebook <http://facebook.com/billward> • Flickr<http://flickr.com/photos/billward/>• Twitter <http://twitter.com/williamward> • LinkedIn<http://www.linkedin.com/pub/william-ward/63/393/985/>
_______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates