diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-11 06:40:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-11 06:40:17 +0000 |
commit | 375d5c3a517c5e6d7415740416867c161929fbfe (patch) | |
tree | c4cf480bbff7a6c0e67cde2196380a9c940e496d /perl_checker.src/test | |
parent | 1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c (diff) | |
download | perl-MDK-Common-375d5c3a517c5e6d7415740416867c161929fbfe.tar perl-MDK-Common-375d5c3a517c5e6d7415740416867c161929fbfe.tar.gz perl-MDK-Common-375d5c3a517c5e6d7415740416867c161929fbfe.tar.bz2 perl-MDK-Common-375d5c3a517c5e6d7415740416867c161929fbfe.tar.xz perl-MDK-Common-375d5c3a517c5e6d7415740416867c161929fbfe.zip |
this case is already handled, only add a test case
Diffstat (limited to 'perl_checker.src/test')
-rw-r--r-- | perl_checker.src/test/suggest_better.t | 2 |
1 files changed, 2 insertions, 0 deletions
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'" |