keyboard: avoid warning for empty mode parameter
[sheet.git] / Shiar_Sheet / Keyboard.pm
index 90ec4e827daee68cc9279315a470de17719b0d73..2b3cc8629e8033d0d818dfd008b6e7efafb16418 100644 (file)
@@ -126,7 +126,7 @@ sub print_key {
 sub print_rows {
        my $self = shift;
        my %moderows = (
-               -DEFAULT => !@_ ? '' : split(/(?:\s*([^=\s]*)=\s*)/, shift),
+               -DEFAULT => !!@_ && $_[0] ne '' && split(/(?:\s*([^=\s]*)=\s*)/, shift),
                # plus specific mode overrides prefixed by '='
        );
        my $defrows = shift || [2, 1, 0];