[Templates] How to access the stash inside of methods?

2010-03-04 Thread Gert Brinkmann
Hello, I have implemented some classes and put one instance of them into the stash. Something like this: my $mine = MyClass-new(); my %vars = ( mine = $mine ); my $stash = Template::Stash::XS-new(\%vars); my $template = Template-new({ ... STASH = $stash, }) || die Template-error(),

[Templates] recognizing session id at home page

2010-03-04 Thread dark0s
I'm using tt2 Template, CGI and CGI::Session modules. I want tracking user session after login. I initialize user session after user login in login.cgi perl script. Can I to set session also in my home (index) page. In index file there is: td width=60% class=cells-style align=right

Re: [Templates] executing an external perl program as a FILTER

2010-03-04 Thread Andy Wardley
On 05/03/2010 04:43, Jim Battle wrote: Question #1: what is the mechanism to add another directory for searching for plugins? ttree --perl5lib c:\path\to\lib Question #2: [% PERL %] sub mycrunch { ... } [% END %] Code written in a PERL block gets re-evaluated

Re: [Templates] How to access the stash inside of methods?

2010-03-04 Thread Gert Brinkmann
Gert Brinkmann wrote on 4 Mar 2010 1:51 PM... Now my question: What is the best way to access the stash inside of a MyClass method? Felipe Gasper (cPanel) wrote: It looks like you want to make a plugin, not something in the stash itself. Generally, the only thing that should access