[gimp-perl] Make ->become return object.
- From: Ed J <edj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-perl] Make ->become return object.
- Date: Tue, 10 Jun 2014 01:23:06 +0000 (UTC)
commit 16ae32e3efe3621e555d97b66d0e254a92229c58
Author: Ed J <edj src gnome org>
Date: Tue Jun 10 02:22:50 2014 +0100
Make ->become return object.
Gimp.pm | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/Gimp.pm b/Gimp.pm
index c41fb4e..c25ec73 100644
--- a/Gimp.pm
+++ b/Gimp.pm
@@ -417,6 +417,7 @@ sub become($$) {
bless $self, $old_class;
Gimp::croak "$_[0] not valid $class"
}
+ $self;
}
sub id { ${+shift} }
}
@@ -860,6 +861,8 @@ a C<Gimp::Drawable>, but you need a C<Gimp::Layer>:
my ($image, $drawable, $color) = @_;
$drawable->become('Gimp::Layer'); # now can call layer methods on it
+Returns C<$object>.
+
=head4 $class->existing($id)
Allows you to instantiate a Gimp-Perl object with the given C<$class>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]