diff options
Diffstat (limited to 'perl_checker.src/test/suggest_better.t')
-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 8d8cb37..be238a2 100644 --- a/perl_checker.src/test/suggest_better.t +++ b/perl_checker.src/test/suggest_better.t @@ -38,6 +38,8 @@ $o = xxx() if !$o; "$foo = ... if !$foo" can be written "$ $o = xxx() unless $o; "$foo = ... unless $foo" can be written "$foo ||= ..." +$o or $o = xxx(); "$foo or $foo = ..." can be written "$foo ||= ..." + $_ =~ s/xxx/yyy/ "$_ =~ s/regexp/.../" can be written "s/regexp/.../" $xxx =~ /^yyy$/ "... =~ /^yyy$/" is better written "... eq 'yyy'" |