From: SourceForge.net <no...@so...> - 2003-04-25 13:20:24
|
Bugs item #713455, was opened at 2003-04-01 19:34 Message generated for change (Comment added) made by dts12 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=713455&group_id=12694 Category: library Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Alex Burger (alex_b) Assigned to: Nobody/Anonymous (nobody) Summary: Perl: Can't use an undefined value as a HASH reference Initial Comment: This works under 4.2.3 under Linux, but gives the error: Can't use an undefined value as a HASH reference at c:/Perl/lib/SNMP.pm line 987. under 5.0.8 when running under Linux, Windows (native) and Windows (cygwin). #!/usr/bin/perl use SNMP; $| = 1; $ENV{'MIBS'} = 'ALL'; &SNMP::initMib(); foreach $a (keys %SNMP::MIB) { print "key: $a\n"; } Am I missing something simple or is it a bug? ---------------------------------------------------------------------- >Comment By: Dave Shield (dts12) Date: 2003-04-25 14:20 Message: Logged In: YES user_id=88893 OK - I'll take that as "Fixed" then. Thanks ---------------------------------------------------------------------- Comment By: Alex Burger (alex_b) Date: 2003-04-24 19:17 Message: Logged In: YES user_id=85836 I get the same error without ALL and with a list of MIBS. I just noticed that if I try it with a fresh 5.0.8 (not CVS), then it does not work. If I try a fresh 5.0.8 with my patch (722075) applied, then it works fine! That would explain why your CVS test worked.. Patch 722075 fixes the use_long problem, and the tag2oid function. I don't think I did much else in that patch that would impact (fix) the hash.. Maybe it was the use_long fix.. Alex ---------------------------------------------------------------------- Comment By: Dave Shield (dts12) Date: 2003-04-24 16:48 Message: Logged In: YES user_id=88893 I've just tried this with a clean CVS installation on my Linux box, and it works fine. What happens if you try with the default list of MIBs (i.e. not setting $ENV{'MIBS'} at all) ? What happens if you set this to a specific list of MIBs, rather than "ALL"? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=713455&group_id=12694 |