From e4ae18a13b9e78d21ee0c214182efd646ac257bb Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 13 Oct 2004 09:48:10 +0000 Subject: replace "my $foo = ... if " with "my $foo = && ..." replace " or my $foo = ..." with "my $foo = ! && ..." --- perl_checker.src/test/various_errors.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'perl_checker.src/test') 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 " with "my $foo = && ..." + +$xxx or my $_x = 'xxx'; replace " or my $foo = ..." with "my $foo = ! && ..." + '' || 'xxx' || ... is the same as ... if ($xxx = '') {} are you sure you did not mean "==" instead of "="? -- cgit v1.2.1