summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test/suggest_better.t
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-04-01 16:07:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-04-01 16:07:12 +0000
commit773c482f5bf399a7c8be144bddd043a52dadf46f (patch)
treeed0dcb8374a7e7c1e60f632867dbd35292d22a3d /perl_checker.src/test/suggest_better.t
parentc20fa0a8ad2c4698b1f966b99581abb1719898c1 (diff)
downloadperl_checker-773c482f5bf399a7c8be144bddd043a52dadf46f.tar
perl_checker-773c482f5bf399a7c8be144bddd043a52dadf46f.tar.gz
perl_checker-773c482f5bf399a7c8be144bddd043a52dadf46f.tar.bz2
perl_checker-773c482f5bf399a7c8be144bddd043a52dadf46f.tar.xz
perl_checker-773c482f5bf399a7c8be144bddd043a52dadf46f.zip
*** empty log message ***
Diffstat (limited to 'perl_checker.src/test/suggest_better.t')
-rw-r--r--perl_checker.src/test/suggest_better.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl_checker.src/test/suggest_better.t b/perl_checker.src/test/suggest_better.t
index aa413cb..9e55e20 100644
--- a/perl_checker.src/test/suggest_better.t
+++ b/perl_checker.src/test/suggest_better.t
@@ -72,8 +72,9 @@ foreach (@l) { use "push @l2, map { ... ? ... : () } .
push @l2, yyy($_) if zzz($_); or sometimes "@l2 = map { ... ? ... : () } ..."
} or sometimes "@l2 = map { if_(..., ...) } ..."
-if (grep { xxx() } @l) {} in scalar context, use "any" instead of "grep"
+if (grep { xxx() } @l) {} in boolean context, use "any" instead of "grep"
$xxx ? $yyy : () you may use if_() here
beware that the short-circuit semantic of ?: is not kept
if you want to keep the short-circuit behaviour, replace () with @{[]} and there will be no warning anymore
+