in reply to Re^4: Refresh a Module
in thread Refresh a Module

> What does delete $My::{Run} do?

It deletes the entry for the symbol (typeglob) in the namespaces/symbol table/ STASH %My::

I can't test now, but my guess is that the compiled code is "linked" to the old typeglob's CODE slot. (IIRC that's what B::Concise shows ¹)

Redefining the sub in a require or eval or whatever will repopulate the slot.

But after deleting the entry in the symbol table a new typeglob is created and autovivified into the stash. °

I could create rather complicated tests to prove all of this with all interpretations of what the OP probably wants to achieve.

Unfortunately I'm too busy for guesswork, and honorable ikegami or Dave Mitchell should know the implementation better.

You might be interested into following introspection tools

Looking up following documentation might help

Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery

Updates

°) Also diving into implementation details is kind of non productive if undef and sub already do the job. And typeglobs are particularly icky Perl4 stuff which are badly explained and supported by introspection.

¹) see Re^2: Refresh a Module