Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by idsfa (Vicar)
on Oct 07, 2003 at 15:04 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://297308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found