Commit e0e5bd59 authored by Robert Ricci's avatar Robert Ricci
Browse files

'require' switch modules, don't 'use' them

This way, we only load the modules that will actually get used,
so modules (like the apcon module) that have other dependencies
won't mess people up.
parent 390dd7b8
......@@ -1448,31 +1448,31 @@ sub snap($) {
#
SWITCH: for ($type) {
(/cisco/) && do {
use snmpit_cisco;
require snmpit_cisco;
$device = new snmpit_cisco($devicename,$self->{DEBUG});
last;
}; # /cisco/
(/foundry1500/ || /foundry9604/)
&& do {
use snmpit_foundry;
require snmpit_foundry;
$device = new snmpit_foundry($devicename,$self->{DEBUG});
last;
}; # /foundry.*/
(/nortel1100/ || /nortel5510/)
&& do {
use snmpit_nortel;
require snmpit_nortel;
$device = new snmpit_nortel($devicename,$self->{DEBUG});
last;
}; # /nortel.*/
(/hp/)
&& do {
use snmpit_hp;
require snmpit_hp;
$device = new snmpit_hp($devicename,$self->{DEBUG});
last;
}; # /hp.*/
(/apcon/)
&& do {
use snmpit_apcon;
require snmpit_apcon;
$device = new snmpit_apcon($devicename,$self->{DEBUG});
last;
}; # /apcon.*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment