![]() |
|
Think about Loose Coupling | |
PerlMonks |
comment on |
( #3333=superdoc: print w/replies, xml ) | Need Help?? |
See require. For efficiency, it will only load the same file once. You can override this by doing: delete $INC{"/path/to/somthing.pm"}; before you try to require that file subsequent times. You'll likely still run into problems because loading the same code twice isn't the same as loading it once. For example, you'll likely get warnings for each subroutine because they are getting redefined. There are several techiniques you can try to use to "clear" the package before you reload so that reloaded module is more likely to act like it has never been loaded before. However, none of them work perfectly. For example, I haven't found a good way to reload the module such that other modules that had previously had routines exported to them would see the new routines instead of the old ones. For example, there is Apache::Reload. See also Reloading Modules. - tye (but my friends call me "Tye")In reply to (tye)Re: Reloading modules more than once
by tye
|
|