You need to export the constants. See, for instance, a module that does it, like Socket. The Exporter module will do all of the work for you once you set the right variables (which Exporter explains).
use base qw(Exporter); use vars qw(@EXPORT); @EXPORT = qw(HOST_BIN HOST_FILE);
In reply to Re: Importing constants into another module
by brian_d_foy
in thread Importing constants into another module
by paulski
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |