summaryrefslogtreecommitdiffstats
path: root/MDK/Common/System.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-04 13:16:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-04 13:16:15 +0000
commita329f0c34eb3f9ec1ed4f699c2962ef1cc379a8a (patch)
tree88d995d52710d0152fb727ad6dc73ed5f1524b85 /MDK/Common/System.pm
parent15698d0e3d680ce81348237b718834bd3b72ef15 (diff)
downloadperl-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/Common/System.pm')
-rw-r--r--MDK/Common/System.pm8
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 {