From 761dac55143a469022f0556017126f96f2bd8c9b Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 24 Sep 2011 15:44:42 +0100 Subject: [PATCH] tests: lib/i3test: Use //= instead of unless exists $args{key} (Thanks mxf) --- testcases/t/lib/i3test.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testcases/t/lib/i3test.pm b/testcases/t/lib/i3test.pm index 87cb769d..2685d695 100644 --- a/testcases/t/lib/i3test.pm +++ b/testcases/t/lib/i3test.pm @@ -144,11 +144,11 @@ sub open_window { my $dont_map = delete $args{dont_map}; - $args{class} = WINDOW_CLASS_INPUT_OUTPUT unless exists $args{class}; - $args{rect} = [ 0, 0, 30, 30 ] unless exists $args{rect}; - $args{background_color} = '#c0c0c0' unless exists $args{background_color}; - $args{event_mask} = [ 'structure_notify' ] unless exists $args{event_mask}; - $args{name} = 'Window ' . counter_window() unless exists $args{name}; + $args{class} //= WINDOW_CLASS_INPUT_OUTPUT; + $args{rect} //= [ 0, 0, 30, 30 ]; + $args{background_color} //= '#c0c0c0'; + $args{event_mask} //= [ 'structure_notify' ]; + $args{name} //= 'Window ' . counter_window(); my $window = $x->root->create_child(%args); -- 2.39.5