Subject: | -port is not supported in "hosts" |
Description of the bug:
The "-port" argument listed in the example is NOT supported in the code.
Platform Information:
* Distribution name and version
Net::SNMP::Util 1.00 1.01
* Perl version (Find this by running the command perl -v)
ActiveState perl 5, version 12, subversion 2 (v5.12.2) built for
MSWin32-x86-multi-thread
* Operating System vendor and version (Find this by running the
command uname -a)
MS Windows 7
Program source:
#! /usr/bin/perl
use strict;
use warnings;
use Net::SNMP::Util;
my ($ret, $err) = snmpget(
hosts => { "localmachine" => {
-hostname => "172.22.12.37",
-port => 20161,
},
},
snmp => { -version => "2c",
-timeout => 5,
-retries => 1,
-community => "public",
},
oids => { sysuptime => "1.3.6.1.2.1.1.3.0",
},
);
print "$ret $err\n";
Program Output:
Argument "hostname" isn't numeric in subtraction (-) at
C:/perl/site/lib/Net/SNMP/Util.pm line 811.
HASH(0x2c2fecc) localmachine, session making error: The
argument "localmachine" is unknown