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
commit9f86fb711bac5e85a6e4135580525c11e51d061c (patch)
treebb1ecafd770fd75da8c1161b5c492b1e3d2eef72 /perl_checker.src/test
parent078acf88d3cc0a0b009690c5cbf951277c041598 (diff)
downloadperl-MDK-Common-9f86fb711bac5e85a6e4135580525c11e51d061c.tar
perl-MDK-Common-9f86fb711bac5e85a6e4135580525c11e51d061c.tar.gz
perl-MDK-Common-9f86fb711bac5e85a6e4135580525c11e51d061c.tar.bz2
perl-MDK-Common-9f86fb711bac5e85a6e4135580525c11e51d061c.tar.xz
perl-MDK-Common-9f86fb711bac5e85a6e4135580525c11e51d061c.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 "="?