in reply to Change package name on the fly?

Maybe Package::Rename can help you?

When in doubt, consult the CPAN!