Subject: | Util_env.pm default MIBDIRS path breaks CPAN install of SNMP::Util |
The default MIBDIRS set in Util_env.pm breaks a CPAN install of
SNMP::Util. By default it is set to:
$ENV{'MIBDIRS'} = '/usr/local/lib/share/snmp/mibs';
I'm not sure that this is a valid path on any distro (not Debian,
Ubuntu, RHEL or SLES). Since the user is not given a chance to set this
during a CPAN install, the automatic "make test" fails with a slew of
module errors, necessitating manual intervention:
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
[...]
Modifying Util_env.pm is mentioned in the README, but since the CPAN
install is automated, one does not have a chance to modify the file
before "make test" is run.
Two possible fixes:
* Set MIBDIRS to something more common, e.g. /usr/share/snmp/mibs
* Prompt the user to input MIBDIRS when running Makefile.PL