in reply to Re: Re: using return to create a module object
in thread using return to create a module object

I don't see anything obviously wrong, though it looks odd to be using a device name as a host name. Is that really what you intend?

You might gain some insight by trying to come up with a small example that demonstrates the problem. Something like

use strict; use Net::SNMP; my $version = ".1.3.6.1.2.1.1.1.0"; my %snmp_options = ( ... }; $s = NET::SNMP->session(\%snmp_options); print $s->get_request($version); $s->close();
and then explicitly fill in %snmp_options.

This approach strips out extraneous detail, and should help you isolate the problem quickly.