Skip to content
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

The default add_method constructor in _check_superclass_constructor assumes $class is not blessed #14

Open
SineSwiper opened this issue Sep 14, 2016 · 1 comment

Comments

@SineSwiper
Copy link

Within _check_superclass_constructor, the $class variable is assumed to be an actual unblessed class all the time. This isn't always the case. It's perfectly legal to call $object->new to get a new object, and $class would then be a blessed object.

Because of this, it fails with strange error messages like:

The constructor for DBIx::Class::ResultSet returned an object whose class is not a parent of 109394. 

The isa check here relies on $class stringification, which is wrong.

@SineSwiper
Copy link
Author

Okay, actually, the resulting object in this case is indeed a different class that would have failed the isa check. So, this is less severe than I thought, and is mostly an error stringification issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant