[perl-Glib-Object-Introspection] Document the "reblessers" configuration mechanism
- From: Torsten SchÃnfeld <tsch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Glib-Object-Introspection] Document the "reblessers" configuration mechanism
- Date: Thu, 2 Aug 2012 17:05:05 +0000 (UTC)
commit 0b4ecb4cb61f4c50be0ee6b518967cbf958534f7
Author: Torsten SchÃnfeld <kaffeetisch gmx de>
Date: Thu Aug 2 19:04:54 2012 +0200
Document the "reblessers" configuration mechanism
lib/Glib/Object/Introspection.pm | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/lib/Glib/Object/Introspection.pm b/lib/Glib/Object/Introspection.pm
index 4217bb0..4c8d619 100644
--- a/lib/Glib/Object/Introspection.pm
+++ b/lib/Glib/Object/Introspection.pm
@@ -341,6 +341,18 @@ be returned, and otherwise an empty list will be returned.
The function names refer to those after name corrections. Functions occuring
in C<handle_sentinel_boolean_for> may also occur in C<class_static_methods>.
+=item reblessers => { package => \&reblesser, ... }
+
+Tells G:O:I to invoke I<reblesser> whenever a Perl object is created for an
+object of type I<package>. Currently, this only applies to boxed unions. The
+reblesser gets passed the pre-created Perl object and needs to return the
+modified Perl object. For example:
+
+ sub Gtk3::Gdk::Event::_rebless {
+ my ($event) = @_;
+ return bless $event, lookup_real_package_for ($event);
+ }
+
=back
=head2 C<< Glib::Object::Introspection->invoke >>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]