Broken
09-14-2001, 06:36 PM
Okay, a question on the require directive, following on from a previous (http://forum.100megswebhosting.com/showthread.php?s=&threadid=594) thread.
My scripts are written as follows:
#! path/to/perl
require "path.pl";
#use directives
#rest of script
1) Now... if I renamed path.pl to say path.frz, all scripts trying to start would choke on the require "path.pl" and terminate, yes?
2) What about scripts that are already runing when I do the rename? Are all variables in path.pl imported into the script's namespace by the require? If so, that would mean that if the require had already been obeyed when path.pl is renamed, the script would continue to run and terminate normally. Is that correct?
3)This is the most important one. Assuming the scripts import the contents of path.pl into their own namespace: will renaming/removing path.pl while the script is importing cause termination of the script? Is there any chance that it may continue to run without having imported the entirety of path.pl?
On a separate topic...
4)Is it possible to run my Perl scripts in scgi-bin without the .pl extension? This is possible with the Apache server under UNIX I know, wasn't sure if it can be done under Linux.
Thanks in advance
Kal.
(Broken)
My scripts are written as follows:
#! path/to/perl
require "path.pl";
#use directives
#rest of script
1) Now... if I renamed path.pl to say path.frz, all scripts trying to start would choke on the require "path.pl" and terminate, yes?
2) What about scripts that are already runing when I do the rename? Are all variables in path.pl imported into the script's namespace by the require? If so, that would mean that if the require had already been obeyed when path.pl is renamed, the script would continue to run and terminate normally. Is that correct?
3)This is the most important one. Assuming the scripts import the contents of path.pl into their own namespace: will renaming/removing path.pl while the script is importing cause termination of the script? Is there any chance that it may continue to run without having imported the entirety of path.pl?
On a separate topic...
4)Is it possible to run my Perl scripts in scgi-bin without the .pl extension? This is possible with the Apache server under UNIX I know, wasn't sure if it can be done under Linux.
Thanks in advance
Kal.
(Broken)