diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-11-17 17:06:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-11-17 17:06:52 +0000 |
commit | 7d1cbb259c63a0cc56ba15433cdef208899e45e7 (patch) | |
tree | d4c6b5165f82b2b72a12c8d0a55593b06774519a /perl_checker.src/test/suggest_better.t | |
parent | cab1e04c6458ab10cdb5ef03f125aee5668695ac (diff) | |
download | perl-MDK-Common-7d1cbb259c63a0cc56ba15433cdef208899e45e7.tar perl-MDK-Common-7d1cbb259c63a0cc56ba15433cdef208899e45e7.tar.gz perl-MDK-Common-7d1cbb259c63a0cc56ba15433cdef208899e45e7.tar.bz2 perl-MDK-Common-7d1cbb259c63a0cc56ba15433cdef208899e45e7.tar.xz perl-MDK-Common-7d1cbb259c63a0cc56ba15433cdef208899e45e7.zip |
recognize a form of "find { ... } ..."
Diffstat (limited to 'perl_checker.src/test/suggest_better.t')
-rw-r--r-- | perl_checker.src/test/suggest_better.t | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perl_checker.src/test/suggest_better.t b/perl_checker.src/test/suggest_better.t index e98e64f..d76abeb 100644 --- a/perl_checker.src/test/suggest_better.t +++ b/perl_checker.src/test/suggest_better.t @@ -92,6 +92,13 @@ foreach (@l) { use "push @l2, map { ... ? ... : () } . push @l2, yyy($_) if zzz($_); or sometimes "@l2 = map { ... ? ... : () } ..." } or sometimes "@l2 = map { if_(..., ...) } ..." +foreach (@l) { use "$xxx = find { ... } ..." + if (xxx($_)) { + $xxx = $_; + last; + } +} + if (grep { xxx() } @l) {} in boolean context, use "any" instead of "grep" $xxx = grep { xxx() } @l; you may use "find" instead of "grep" |