Ashcrow has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am writing a small app that needs to be able to use modules on command. Each module has the same set of subs but they all do their duties diffrently. The problem I am facing is that I seem to be able to only require a file once. For instance:
I am writing a small app that needs to be able to use modules on command. Each module has the same set of subs but they all do their duties diffrently. The problem I am facing is that I seem to be able to only require a file once. For instance:
still leaves me using the diffrent module. How can I reload a module? Please enlighten me!# Both modules have todo(); require "/path/to/something.pm"; # sets todo() require "/another/pathto/diffrent.pm"; # overwrites todo() require "/path/to/something.pm"; # doesn't do anything
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Reloading modules more than once
by abaxaba (Hermit) on Aug 04, 2002 at 07:14 UTC | |
Re: Reloading modules more than once
by Zaxo (Archbishop) on Aug 04, 2002 at 07:03 UTC | |
Re: Reloading modules more than once
by danger (Priest) on Aug 04, 2002 at 13:54 UTC | |
Re: Reloading modules more than once
by sauoq (Abbot) on Aug 04, 2002 at 08:17 UTC | |
(tye)Re: Reloading modules more than once
by tye (Sage) on Aug 04, 2002 at 17:49 UTC |
Back to
Seekers of Perl Wisdom