summaryrefslogtreecommitdiffstats
path: root/perl-install/mygtk3.pm
diff options
context:
space:
mode:
authorThierry.Vignaud <thierry.vignaud@gmail.com>2014-05-28 22:37:23 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2014-05-28 22:37:23 +0200
commitdf74e103d8de6d7cc45cc3e2a99f4b9c8fff6085 (patch)
tree3ce05fa2bbad4d01d0df7a268abab40315b72e22 /perl-install/mygtk3.pm
parentac656a1c73103b06962ab6199da16a8607528c19 (diff)
downloaddrakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.gz
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.bz2
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.tar.xz
drakx-df74e103d8de6d7cc45cc3e2a99f4b9c8fff6085.zip
simplify using member()
Diffstat (limited to 'perl-install/mygtk3.pm')
-rw-r--r--perl-install/mygtk3.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/mygtk3.pm b/perl-install/mygtk3.pm
index 226427e58..973880d0b 100644
--- a/perl-install/mygtk3.pm
+++ b/perl-install/mygtk3.pm
@@ -1226,7 +1226,7 @@ sub _gtknew_handle_children {
foreach (@child) {
my ($fill, $child) = @$_;
- $fill eq '0' || $fill eq '1' || $fill eq 'fill' || $fill eq 'expand' or internal_error("odd {children} parameter must be 0 or 1 (got $fill)");
+ member($fill, qw(0 1 fill expand)) or internal_error("odd {children} parameter must be 0 or 1 (got $fill)");
ref $child or $child = Gtk3::WrappedLabel->new($child);
my $expand = $fill && $fill ne 'fill' ? 1 : 0;
$w->pack_start($child, $expand, $fill, $padding || 0);
@@ -1261,7 +1261,7 @@ sub mygtk3::MagicWindow::AUTOLOAD {
my ($s1, @s2) = $meth eq 'show'
? ('real_window', 'banner', 'child') :
- $meth eq 'destroy' || $meth eq 'hide' ?
+ member($meth, qw(destroy hide)) ?
($w->{pop_it} ? 'real_window' : ('child', 'banner')) :
$meth eq 'get' && $args[0] eq 'window-position' ||
$for_real_window{$meth} ||