Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Re: Re: Re: SNMP MIB files...

by idsfa (Vicar)
on Oct 07, 2003 at 15:04 UTC ( #297308=note: print w/replies, xml ) Need Help??


in reply to Re^4: SNMP MIB files...
in thread SNMP MIB files...

You could extend the SNMP class to add your needed code to the mib loading method and then SUPER:: it. This would probably be more work than adding the few lines you need.

Also, you probably ought to avoid that `ls` construction and go with readdir ...

$root="/usr/local/share/snmp/mibs/TEMP"; opendir(DIR, $root) || die "can't opendir $root: $!"; map { &SNMP::addMibDirs($_); } grep { ! /^\./ && -d "$root/$_" } readdir(DIR); closedir DIR;

Which also avoids accidentally trying to add files as MibDirs and is safer and more portable.


Remember, when you stare long into the abyss, you could have been home eating ice cream.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://297308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2021-01-28 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?