I am using the standard importer, I think (I never overloaded any import function). At the beginning of NETWORK::SNMP, I have the following code (periods represent omitted code):
require Exporter;
@EXPORT=qw(@chassistypes $commstring $sysname $syscontact $syslocation
+ $ipadentaddr
$cdpdevicecacheport $ipadentnetmask $cdpcacheplatform $cdpcach
+edeviceport
$chassisid $chassistype $sysdesc $romid);
........
$commstring=`/usr/bin/cat /var/scripts/.data/commstring`;
chomp $commstring;
........
1;
The following code appears in NETWORK::Discovery:
package NETWORK::Discovery;
use NETWORK::SNMP;
use Net::SNMP;
use Net::Ping;
sub new {
...
}
sub discover_pvp {
...
}
sub getnext_device {
....
}
sub getnext_nonsnmp {
...
}
1;
|