|more useful options|
Sharing Global variables between scriptsby TASdvlper (Monk)
|on Apr 16, 2004 at 20:49 UTC||Need Help??|
TASdvlper has asked for the
wisdom of the Perl Monks concerning the following question:
I'm trying to declare global variables between scripts and am having some problems.
In a script called Dispatcher.cgi.pl I declare a package called Dispatcher (see below):
Basically, I'm trying to expose $project, $release and $globalpid as global variable so other modules/script can use them.
But, in a script called TAZ.pl, I'm trying to use those variables and it's giving me a error message:
Undefined subroutine &DispatchParser::GetUser called at ../exe/TAZ.pl line 33.
Where the function GetUser is defined in the module CommonFunctions (see below).
I'm a little puzzled as to what is going on.
I'm guessing it has something to do with the order I include the package ?
Any help would be greatly appreciated.
I'm calling TAZ.pl from within Dispatcher.cgi.pl.
When TAZ.pl completes it goes back to Dispatcher.cgi.pl and then that code completes.