diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-10-13 09:48:10 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-10-13 09:48:10 +0000 |
commit | e4ae18a13b9e78d21ee0c214182efd646ac257bb (patch) | |
tree | c213dcfdb406908101bb6cef573c85e4b4352d3b /perl_checker.src/test | |
parent | 5a27844f3451bfb59d25966ec524023b383dba8e (diff) | |
download | perl_checker-e4ae18a13b9e78d21ee0c214182efd646ac257bb.tar perl_checker-e4ae18a13b9e78d21ee0c214182efd646ac257bb.tar.gz perl_checker-e4ae18a13b9e78d21ee0c214182efd646ac257bb.tar.bz2 perl_checker-e4ae18a13b9e78d21ee0c214182efd646ac257bb.tar.xz perl_checker-e4ae18a13b9e78d21ee0c214182efd646ac257bb.zip |
replace "my $foo = ... if <cond>" with "my $foo = <cond> && ..."
replace "<cond> or my $foo = ..." with "my $foo = !<cond> && ..."
Diffstat (limited to 'perl_checker.src/test')
-rw-r--r-- | perl_checker.src/test/various_errors.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perl_checker.src/test/various_errors.t b/perl_checker.src/test/various_errors.t index 901612f..dabb641 100644 --- a/perl_checker.src/test/various_errors.t +++ b/perl_checker.src/test/various_errors.t @@ -6,6 +6,10 @@ $xxx[1, 2] you must give only one argument $xxx[] you must give one argument +my $_x = 'xxx' if $xxx; replace "my $foo = ... if <cond>" with "my $foo = <cond> && ..." + +$xxx or my $_x = 'xxx'; replace "<cond> or my $foo = ..." with "my $foo = !<cond> && ..." + '' || 'xxx' <constant> || ... is the same as ... if ($xxx = '') {} are you sure you did not mean "==" instead of "="? |