I have some Class::DBI modules that I want to provide an additional name for. To play nice and not clutter up the global namespace I've made Class::DBI classes with names like OrganizationName::ProjectName::Object , but I'd also like these objects (preferably in a configurable way) to be available under shorter names like for instance ProjectName::Object (to avoid typo's, overly long lines of code when using these classes, etc.). Initially I thought that would be as simple as:
*ProjectName::Object = *OrganizationName
but that doesn't work, at least not for my Class::DBI Object-modules: When I try to use an object by its shorter name, it's methods are not defined.
Another try that failed is using inheritance, but somehow this doesn't work either:
... package code here ...
use base "OrganizationName::ProjectName::Object";
(complains about not being able to find object methods via the short package name).
I have tried to find information on this, but I think I'm using the wrong search terms. Can anybody tell me if what I want is possible, and where to find information about it?