in reply to Refresh a Module
Deleting the Stash entry after the call is compiled doesn't help, because the reference is cached.
But you can always redefine/redeclare the sub. An already compiled call will execute the new code.
If you are looking for a way to destroy a sub in a way to make an already compiled call break, I'm very sceptical about the wisdom of this concept.
FWIW: you can also try delete $::{'My::'} to delete the whole package. But this won't touch already referenced elements, resp. compiled calls.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Refresh a Module
by LanX (Saint) on Sep 26, 2024 at 15:06 UTC | |
|
Re^2: Refresh a Module
by Danny (Chaplain) on Sep 25, 2024 at 23:25 UTC | |
by LanX (Saint) on Sep 26, 2024 at 00:50 UTC | |
by Danny (Chaplain) on Sep 26, 2024 at 03:19 UTC | |
by LanX (Saint) on Sep 26, 2024 at 13:54 UTC | |
by Timka (Acolyte) on Sep 26, 2024 at 03:35 UTC | |
by LanX (Saint) on Sep 26, 2024 at 09:36 UTC |