in reply to Object factories

It's reasonable to provide static methods in a Factory class that will let you register new classes by name. For example, see the Class::Factory module on CPAN. Then you can provide access to classes that are in files outside of your main file, and you don't have to expose a global variable.