in reply to Using optional table option in Net::Netmask

First thing I do in times like these:
use Data::Dumper; ... print Dumper $b;
Looks like the fn call expects a blessed hash - but gets an array ref?

Replies are listed 'Best First'.
Re^2: Using optional table option in Net::Netmask
by cummiro (Initiate) on Oct 21, 2011 at 21:02 UTC

    I ran Data::Dumper on both the $b and $acl_block values.

    ($b) = $VAR1 = '10.10.10.248#0.0.0.7'; (4acl_block) = $VAR1 = bless( { 'IBASE' => 168430328, 'BITS' => 29 }, 'Net::Netmask' ); Pseudo-hashes are deprecated at /usr/apps/ucm/perl_mod/lib/perl5/site_ +perl/5.8.8/Net/Netmask.pm line 265, <INFILE1> line 17. Pseudo-hashes are deprecated at /usr/apps/ucm/perl_mod/lib/perl5/site_ +perl/5.8.8/Net/Netmask.pm line 265, <INFILE1> line 17. No such pseudo-hash field "168430328" at /usr/apps/ucm/perl_mod/lib/pe +rl5/site_perl/5.8.8/Net/Netmask.pm line 265, <INFILE1> line 17.

    It looks like both values are being interpreted correctly but I'm still seeing the same issue. Thanks......

      Cracked it I think.
      The documentation is misleading:
      ->storeNetblock([$t])
      It doesn't mean pass an array - it means that $t is an optional argument.
      This works for me:
      my $acl_tbl = {}; $acl_block->storeNetblock($acl_tbl);

        That was it. I thought I had tried that, but I guess something was missing. Thanks so much!!!!!