New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load_schema with shorten is broken #22
Comments
Aha. Problem with aliased approach is that has to be done during BEGIN. So we could add an import API like this:
That could then be made to do what load_schema does now except do the aliased.pm approach to aliasing. But if load_schema is called at runtime, we have to clone the meta object in load_schema():
That appears to work, but feels brittle. Not sure what you want to do. |
See SHA: 8ac44e4 |
Whoops. Wrong button. (Sigh) |
- author David Golden (dagolden) - fixes issue GH #22
There. For now, cloning the metadata feels like it will do. The new load_schema API on use Mongoose feels a bit out of place, need to sleep on it some more. |
When shortening, the shortened name is a glob alias, which causes class methods on the alias to get a class name that doesn't correspond to a metaclass registered with Class::MOP.
I think the fix is to do what aliased.pm does, which is to import a constant subroutine that returns the original package name, e.g. something like this:
The text was updated successfully, but these errors were encountered: