Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
What I would like to do is something like this (non-functioning):
playdaemon:
#!/usr/bin/perl
require "MyRoutines.pl";
$SIG{HUP}=sub { require "MyRoutines.pl"; };
while (1) {
DoIt();
}
__END__
Then, as I change the contents of MyRoutines.pl, I could send a SIGHUP to my program and it would reload the contents of MyRoutines.pl to reflect the changes.
Is such a thing possible? I believe my problem is that PERL already knows it has loaded the MyRoutines.pl library and won't do so again. How many I accomplish this?
TIA!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Forcing a PERL script to reload libraries
by merlyn (Sage) on Dec 20, 2000 at 20:14 UTC | |
by mr.nick (Chaplain) on Dec 20, 2000 at 20:23 UTC | |
|
Re: Forcing a PERL script to reload libraries
by KM (Priest) on Dec 20, 2000 at 20:24 UTC |