Just for completeness... Here is what works but that you probably shouldn't do:
anduse OUILookup qw( get_oui_owner $oui_location ); $oui_location = "oui2.txt";
That is, ex/importing 'x' is the same as eximporting '&x' so to export a variable you have to include the '$', '@', or '%' in both the @EXPORT/@EXPORT_OK and the use line. - tye (but my friends call me "Tye")package OUILookup; use strict; use warnings; use base qw( Exporter ); use LWP::Simple; use vars qw( @EXPORT @EXPORT_OK $VERSION $oui_address $oui_location ); BEGIN { @EXPORT= qw(get_oui_owner); @EXPORT_OK= qw( $oui_address $oui_location ); $VERSION = 1.00; $oui_address = "http://standards.ieee.org/regauth/oui/oui.txt"; $oui_location = "oui.txt"; }
In reply to (tye)Re: Allowing user to change module variables
by tye
in thread Allowing user to change module variables
by mvaline
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |