[Templates] [Fwd: Re: TT2 and Plugin CGI: GET params are not being updated]

2009-02-10 Thread Simon Wilcox
Hi Marc, On 10/2/09 07:34, Marc Sebastian Pelzer wrote: > thanks for the suggestions! I tried to disable the TT-Cache and also > to reset the CGI parameters after each call, but both does not help. > It seems like CGI.pm is not compatible with the Catalyst build in web- > server. CGI.pm isn'

[Templates] Net::IP

2009-02-10 Thread Brian Sherwood
Hello, I am trying to use the Net::IP module within a template and seem to be having some problems. I am setting LOAD_PERL and just loading the standard Perl Net::IP module. I can instantiate an object as follows: [% connector1 = '1.2.10.128/29' %] [%- USE c1_net = Net::IP ( connector1 ) -%]

Re: [Templates] Net::IP

2009-02-10 Thread Darren Chamberlain
On Tue, Feb 10, 2009 at 21:58, Brian Sherwood wrote: > I am trying to use it as follows: > > [% c2_net = $c1_net.ip_add_num(2) %] Why $c1_net and not c1_net ? -- (darren) ___ templates mailing list templates@template-toolkit.org http://mail.template-

Re: [Templates] Net::IP

2009-02-10 Thread C. Chad Wallace
At 9:58 PM on 10 Feb 2009, Brian Sherwood wrote: > Hello, > > I am trying to use the Net::IP module within a template and seem to be > having some problems. > I am setting LOAD_PERL and just loading the standard Perl Net::IP > module. > > I can instantiate an object as follows: > > [% connect

Re: [Templates] Net::IP

2009-02-10 Thread Brian Sherwood
Good question. I tried it without the '$'. When it did not work I tried it with the '$' [% connector1 = '1.2.10.128/29' %] [%- USE c1_net = Net::IP ( connector1 ) -%] connector1 = [% c1_net.prefix %] connector1 = [% c1_net.ip %] [% c1_net.mask %] [% c2_net = c1_net.ip_add_num(2) %] connector2

Re: [Templates] Net::IP

2009-02-10 Thread Simon Wilcox
On 11/2/09 02:58, Brian Sherwood wrote: > Any help/suggestions are welcome. Using LOAD_PERL is usually a code smell, meaning that there's probably a better way of doing it. You might try creating a plugin for Net::IP. That should be fairly easy, see the docs at http://search.cpan.org/~abw/Templa