use lib '.'; use My; eval "My::Run('eval')"; My::Run('normal'); delete $INC{"My.pm"}; # --- Why do this? undef &My::Run; # 1. Avoids warning redefined # 2. will deactivate function if missing in new module # --- Why DON'T do this # delete $My::{Run}; # If you destroy the symbol, Perl won't know how to handle optimies opcode require My; eval "My::Run('eval')"; My::Run('normal');