Hi,

I am using the Net::Netmask module to handle some IP prefix problems. I have
a question about its usage. I want to store a block in two tables, and I may
delete the block from one of the tables at some later time, it appears that
the block is deleted from both tables. See the following code.

#!/usr/bin/perl -w
use strict;
use Net::Netmask;

my $t1;
my $t2;

my $ip = "x.y.1.1";
my $prefix = "x.y.0.0/16";

my $block = new Net::Netmask($prefix);
$block->storeNetblock($t1);
$block->storeNetblock($t2);

$block->deleteNetblock($t1);

my $newblock = findNetblock($ip, $t2);

if ($newblock) {
 my $ippref = $newblock->desc();
 print "$ippref\n";
}

It turns out that $newblock is undefined.

Thanks,
Jason

Reply via email to