summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/test
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-13 09:48:10 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-13 09:48:10 +0000
commite4ae18a13b9e78d21ee0c214182efd646ac257bb (patch)
treec213dcfdb406908101bb6cef573c85e4b4352d3b /perl_checker.src/test
parent5a27844f3451bfb59d25966ec524023b383dba8e (diff)
downloadperl_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.t4
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 "="?