Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

strict stash vars

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


ruslan at emumail

Oct 17, 2008, 9:19 AM

Post #1 of 2 (569 views)
Permalink
strict stash vars

Hi.
I wonder if there is a stricter stash plugin to store vars?
I mean stash that knows what exactly variables have been created,
so if I make a typo in my template file, it will croak about invalid var.
Also, I can easily overwrite someone's (plugin?) var, because
of free form "namespace", and this may break things and will be
very hard to debug, imho.
Please advise.

--
rb


_______________________________________________
List: Catalyst [at] lists
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/


ian at sillit

Oct 17, 2008, 10:30 AM

Post #2 of 2 (517 views)
Permalink
Re: strict stash vars [In reply to]

> I wonder if there is a stricter stash plugin to store vars?
> I mean stash that knows what exactly variables have been created,
> so if I make a typo in my template file, it will croak about invalid var.


Try turning on the 'DEBUG_UNDEF' flag in your TT2 config:

http://template-toolkit.org/docs/manual/Config.html#section_DEBUG

---

use Template::Constants qw( :debug );

my $template = Template->new({
DEBUG => DEBUG_UNDEF
});

DEBUG UNDEF

This option causes the Template Toolkit to throw an 'undef' error whenever
it encounters an undefined variable value.

---


Cheers,

Ian

--
Dr Ian Sillitoe
CATH Team -- http://cathdb.info

"Advice is what we ask for when we already know
the answer but wish we didn't" -- Erica Jong

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.