diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-04 13:16:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-04 13:16:15 +0000 |
commit | a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a (patch) | |
tree | 88d995d52710d0152fb727ad6dc73ed5f1524b85 /MDK | |
parent | 15698d0e3d680ce81348237b718834bd3b72ef15 (diff) | |
download | perl-MDK-Common-a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a.tar perl-MDK-Common-a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a.tar.gz perl-MDK-Common-a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a.tar.bz2 perl-MDK-Common-a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a.tar.xz perl-MDK-Common-a329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a.zip |
- warn use of "cond ? list : ()" (use if_(cond, list) instead)
- adapt MDK::Common::* to this (using @{[]} instead of () to avoid the warning)
Diffstat (limited to 'MDK')
-rw-r--r-- | MDK/Common/System.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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 { |