diff options
Diffstat (limited to 'perl_checker')
-rwxr-xr-x | perl_checker | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/perl_checker b/perl_checker index 12cf3a2..1785269 100755 --- a/perl_checker +++ b/perl_checker @@ -70,6 +70,9 @@ if (/\bsub\b\s*\{[^{}]*\$_(?!\[)/) { if ((my ($op) = /([<>]{2})/) && (/[+-]\s*[\w\$]+\s*[<>]{2}/ || /[<>]{2}\s*[\w\$]+\s*[+-]/) && !/\<\<[A-Z]/) { # don't warn for here-document alike err(qq(parentheses needed around operator $op), info()); } +if (/=.*:\s*\$\w+\s*=/) { + err(q(do not use ``cond ? $v1 = XX1 : $v2 = XX2'' which is parted as ``(cond ? $v1 = XX1 : $v2) = XX2''), info()); +} if (/^\s*package ([\w:]+)/) { $package = $1; |