GNOME Bugzilla – Bug 690461
Glib::Object::New for subclass cleanliness
Last modified: 2021-07-05 12:22:16 UTC
Created attachment 231846 [details] [review] patch and test This is an idea for a separate Glib::Object::New to put the Glib::Object::new() into an object subclass created by Glib::Object::Subclass. Putting Glib::Object::New into the @ISA of the subclass helps keep the import() of Glib::Object::Subclass out of the subclass.
Make sense to me, and my testing doesn't reveal any compatibility issues. muppet, what do you think? I'm not completely sold on the name "Glib::Object::New". I wouldn't have guessed that it provides a default constructor. I can't think of a better alternative right now, though. Nowadays, modules of this kind seem to be called roles or mixins, but there appears no clear naming convention for them yet.
Perhaps Glib::Object::Base::New to suggest its purpose. I don't see much either "Base" or "Mixin" on cpan. Where does all the multi-inheritence hide? Or is no-one foolish enough to try it? :-) "Roles" are to declare that you have certain features or methods, rather than actually implementing them, are they?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME?utf8=%E2%9C%93&filter=perl- Thank you for your understanding and your help.