After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690461 - Glib::Object::New for subclass cleanliness
Glib::Object::New for subclass cleanliness
Status: RESOLVED OBSOLETE
Product: gnome-perl
Classification: Bindings
Component: Glib
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk2-perl-bugs
gtk2-perl-bugs
Depends on:
Blocks:
 
 
Reported: 2012-12-18 23:02 UTC by Kevin Ryde
Modified: 2021-07-05 12:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch and test (7.14 KB, patch)
2012-12-18 23:02 UTC, Kevin Ryde
none Details | Review

Description Kevin Ryde 2012-12-18 23:02:01 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.
Comment 1 Torsten Schoenfeld 2013-02-16 20:39:22 UTC
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.
Comment 2 Kevin Ryde 2013-02-28 01:00:15 UTC
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?
Comment 3 GNOME Infrastructure Team 2021-07-05 12:22:16 UTC
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.