Hello,
I have a Web application that I am currently working on and it will require a config file. This is how the program will be work.
User goes to
File 1.
use module;
require 'config.pl'
require 'file2.cgi'
#do something
File 2
use module;
require 'config.pl'
#do something
Config.
use constant CONSTANT => 'VALUE'
Question: How would I make it so that by using require (or use) that all the constants in Config would be made available to use without using a fully qualified name (so, say CONSTANT instead of main::CONSTANT)? Also, I would liket o know if the "use module" in file 1 and 2 requires moer memory than not including "use module" in file 2... (So, if 'module' exported variables would it require more memory to have it included twice?)
I have a Web application that I am currently working on and it will require a config file. This is how the program will be work.
User goes to
File 1.
use module;
require 'config.pl'
require 'file2.cgi'
#do something
File 2
use module;
require 'config.pl'
#do something
Config.
use constant CONSTANT => 'VALUE'
Question: How would I make it so that by using require (or use) that all the constants in Config would be made available to use without using a fully qualified name (so, say CONSTANT instead of main::CONSTANT)? Also, I would liket o know if the "use module" in file 1 and 2 requires moer memory than not including "use module" in file 2... (So, if 'module' exported variables would it require more memory to have it included twice?)