Skip Menu |

This queue is for tickets about the Net-SNMP-Util CPAN distribution.

Report information
The Basics
Id: 65537
Status: resolved
Worked: 16 hours (960 min)
Priority: 0/
Queue: Net-SNMP-Util

People
Owner: Nobody in particular
Requestors: alphatan.zh [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.00
  • 1.01
Fixed in: (no value)



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
Thank you for your bug reports. I fixed that bug at latest version, 1.04. Regards