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 ) -%]
% c2_net = c1_net.ip_add_num(2) %]
connector2 = [% c2_net.prefix %]
returns:
connector1 = 1.2.10.128/29
connector1 = 1.2.10.128 255.255.255.248
connector2 =
On Tue, Feb 10, 2009 at 10:04 PM, Darren Chamberlain wrote:
> On Tue, Feb 10, 2009 at 21:58, Brian Sherwood wrote:
> > I am trying
Thank you all. A lot of good ideas, but so far no luck :(
Simon recommended writing a plugin, or wrapping Net::IP using
Template::Plugin::Class
I tried using the Template::Plugin::Class, but it would throw an exception.
I used the following code:
[% connector1 = '1.2.10.128/29' %]
[% USE c1_net
On Thu, Feb 12, 2009 at 5:12 AM, Dave Howorth wrote:
> Brian Sherwood wrote:
> > Thank you all. A lot of good ideas, but so far no luck :(
> >
> > Simon recommended writing a plugin, or wrapping Net::IP using
> > Template::Plugin::Class
> > I tried using the Temp
x27; => 0001001010101111
'last_ip' => '1.2.10.135'
For some reason the ip_add_num does not fill out all the variables internal
to the object.
I just assumed that it would return a complete object, not one that only
defined half the internal variab