From 6dbd5d43552c3b223c32dcacdfb709f91e0ab170 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 11 Aug 2004 06:40:17 +0000 Subject: this case is already handled, only add a test case --- perl_checker.src/test/suggest_better.t | 2 ++ 1 file changed, 2 insertions(+) (limited to 'perl_checker.src/test/suggest_better.t') diff --git a/perl_checker.src/test/suggest_better.t b/perl_checker.src/test/suggest_better.t index 247fe6c..8d8cb37 100644 --- a/perl_checker.src/test/suggest_better.t +++ b/perl_checker.src/test/suggest_better.t @@ -36,6 +36,8 @@ $o->m0() remove these unneeded parentheses $o = xxx() if !$o; "$foo = ... if !$foo" can be written "$foo ||= ..." +$o = xxx() unless $o; "$foo = ... unless $foo" can be written "$foo ||= ..." + $_ =~ s/xxx/yyy/ "$_ =~ s/regexp/.../" can be written "s/regexp/.../" $xxx =~ /^yyy$/ "... =~ /^yyy$/" is better written "... eq 'yyy'" -- cgit v1.2.1