From 9489733155cb199ab41f48edde55a214554bafaa Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Thu, 7 Jun 2012 21:20:18 +0200 Subject: [PATCH] parallel: defined(@array) is deprecated. --- src/parallel | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/parallel b/src/parallel index 31f4ac1b..f6fc091a 100755 --- a/src/parallel +++ b/src/parallel @@ -184,7 +184,7 @@ if($::opt_nonall or $::opt_onall) { ((defined $::opt_group) ? "-g" : ""), ((defined $::opt_joblog) ? "--joblog $::opt_joblog" : ""), ((defined $::opt_colsep) ? "--colsep ".shell_quote($::opt_colsep) : ""), - ((defined @::opt_v) ? "-vv" : ""), + ((@::opt_v) ? "-vv" : ""), ((defined $::opt_D) ? "-D" : ""), ((defined $::opt_timeout) ? "--timeout ".$::opt_timeout : ""), ); @@ -605,7 +605,7 @@ sub parse_options { print STDERR "$Global::progname: -H has been retired. Use --halt.\n"; ::wait_and_exit(255); } - if(defined @::opt_v) { $Global::verbose = $#::opt_v+1; } # Convert -v -v to v=2 + if(@::opt_v) { $Global::verbose = $#::opt_v+1; } # Convert -v -v to v=2 $Global::debug = (defined $::opt_D); if(defined $::opt_X) { $Global::ContextReplace = 1; } if(defined $::opt_silent) { $Global::verbose = 0; } @@ -651,9 +651,9 @@ sub parse_options { if(defined $::opt_version) { version(); wait_and_exit(0); } if(defined $::opt_bibtex) { bibtex(); wait_and_exit(0); } if(defined $::opt_show_limits) { show_limits(); } - if(defined @::opt_sshlogin) { @Global::sshlogin = @::opt_sshlogin; } - if(defined @::opt_sshloginfile) { read_sshloginfiles(@::opt_sshloginfile); } - if(defined @::opt_return) { push @Global::ret_files, @::opt_return; } + if(@::opt_sshlogin) { @Global::sshlogin = @::opt_sshlogin; } + if(@::opt_sshloginfile) { read_sshloginfiles(@::opt_sshloginfile); } + if(@::opt_return) { push @Global::ret_files, @::opt_return; } if(not defined $::opt_recstart and not defined $::opt_recend) { $::opt_recend = "\n"; } if(not defined $::opt_blocksize) { $::opt_blocksize = "1M"; } @@ -704,7 +704,7 @@ sub parse_options { $Global::grouped = 0; } } - if(defined @::opt_trc) { + if(@::opt_trc) { push @Global::ret_files, @::opt_trc; $::opt_transfer = 1; $::opt_cleanup = 1; @@ -1567,19 +1567,19 @@ sub parse_sshlogin { if($::opt_transfer or @::opt_return or $::opt_cleanup or @::opt_basefile) { if(not remote_hosts()) { # There are no remote hosts - if(defined @::opt_trc) { + if(@::opt_trc) { print $Global::original_stderr "parallel: Warning: --trc ignored as there are no remote --sshlogin\n"; } elsif (defined $::opt_transfer) { print $Global::original_stderr "parallel: Warning: --transfer ignored as there are no remote --sshlogin\n"; - } elsif (defined @::opt_return) { + } elsif (@::opt_return) { print $Global::original_stderr "parallel: Warning: --return ignored as there are no remote --sshlogin\n"; } elsif (defined $::opt_cleanup) { print $Global::original_stderr "parallel: Warning: --cleanup ignored as there are no remote --sshlogin\n"; - } elsif (defined @::opt_basefile) { + } elsif (@::opt_basefile) { print $Global::original_stderr "parallel: Warning: --basefile ignored as there are no remote --sshlogin\n"; }