From a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 4 Dec 2002 13:16:15 +0000 Subject: - warn use of "cond ? list : ()" (use if_(cond, list) instead) - adapt MDK::Common::* to this (using @{[]} instead of () to avoid the warning) --- MDK/Common/System.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'MDK/Common/System.pm') diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm index c41485b..7ef5fc7 100644 --- a/MDK/Common/System.pm +++ b/MDK/Common/System.pm @@ -300,7 +300,7 @@ sub setVarsInShMode { @fields = keys %$l unless @fields; MDK::Common::File::output($file, - map { $l->{$_} ? "$_=$l->{$_}\n" : () } @fields + map { $l->{$_} ? "$_=$l->{$_}\n" : @{[]} } @fields ); chmod $mod, $file; } @@ -310,8 +310,8 @@ sub setExportedVarsInSh { @fields = keys %$l unless @fields; MDK::Common::File::output($file, - (map { $l->{$_} ? "$_=$l->{$_}\n" : () } @fields), - @fields ? "export " . join(" ", @fields) . "\n" : (), + (map { $l->{$_} ? "$_=$l->{$_}\n" : @{[]} } @fields), + @fields ? "export " . join(" ", @fields) . "\n" : @{[]}, ); } @@ -319,7 +319,7 @@ sub setExportedVarsInCsh { my ($file, $l, @fields) = @_; @fields = keys %$l unless @fields; - MDK::Common::File::output($file, map { $l->{$_} ? "setenv $_ $l->{$_}\n" : () } @fields); + MDK::Common::File::output($file, map { $l->{$_} ? "setenv $_ $l->{$_}\n" : @{[]} } @fields); } sub template2file { -- cgit v1.2.1