in reply to Re: Re: Importing symbols into main when library is already in %INC
in thread Importing symbols into main when library is already in %INC

What's in @EXPORT in the two modules? How is $commstring defined? Are you using the standard importer?

-- Randal L. Schwartz, Perl hacker

  • Comment on Re: Re: Re: Importing symbols into main when library is already in %INC

Replies are listed 'Best First'.
Re: Re: Re: Re: Importing symbols into main when library is already in %INC
by smashdot (Initiate) on May 16, 2001 at 23:15 UTC
    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;