From 773c482f5bf399a7c8be144bddd043a52dadf46f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 1 Apr 2004 16:07:12 +0000 Subject: *** empty log message *** --- perl_checker.src/test/suggest_better.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl_checker.src') 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 + -- cgit v1.2.1