in reply to Fun with an auto-update

You may want to look at how the CPAN module's reload command is implemented. When you're in the CPAN shell, you can install CPAN and then reload to immediately load the new version, without leaving the shell.