summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk3.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/ugtk3.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/ugtk3.pm')
-rw-r--r--perl-install/ugtk3.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/ugtk3.pm b/perl-install/ugtk3.pm
index cd0b45142..4a393ac66 100644
--- a/perl-install/ugtk3.pm
+++ b/perl-install/ugtk3.pm
@@ -290,7 +290,7 @@ That can simplify some writings but this arg(s) MUST then be present...
=cut
my (%attr, $attrs);
- ref($_[0]) eq 'HASH' || ref($_[0]) eq 'ARRAY' and $attrs = shift;
+ member(ref($_[0]), qw(HASH ARRAY)) and $attrs = shift;
foreach (@attributes_list) {
if (($default_attrs->{$_} || '') eq 'arg') {
ref($_[0]) and internal_error "error in packing definition\n";
@@ -602,7 +602,7 @@ sub create_okcancel {
if (!defined $wm_is_kde) {
require any;
my $wm = any::running_window_manager();
- $wm_is_kde = !$::isInstall && ($wm eq "kwin" || $wm eq "compiz" && fuzzy_pidofs(qr/\bkde-window-decorator\b/)) || 0;
+ $wm_is_kde = !$::isInstall && (member($wm, qw(kwin compiz)) && fuzzy_pidofs(qr/\bkde-window-decorator\b/)) || 0;
}
my $f = sub { $w->{buttons}{$_[0][0]} = ref($_[0][0]) =~ /Gtk3::Button/ ?
$_[0][0] :