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:
> 
> [%  connector1 = '1.2.10.128/29' %]
> 
> [%- USE c1_net = Net::IP ( connector1 ) -%]
[...]
> The problem comes when I want to use the ip_add_num method.
> This method increments the IP address by the number given and returns
> another Net::IP object.
> I am trying to use it as follows:
> 
> [% c2_net = $c1_net.ip_add_num(2) %]
              ^
Get rid of the dollar sign.


> (This should return a Net::IP object with "1.2.10.130/29")
> 
> I don't seem to be getting an error, or any kind of output.
> 
> connector2 = [% c2_net.prefix %]
> 
> returns
> 
> connector2 =






-- 

C. Chad Wallace, B.Sc.
The Lodging Company
http://www.skihills.com/
OpenPGP Public Key ID: 0x262208A0

Attachment: signature.asc
Description: PGP signature

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to