diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-08-09 17:11:08 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-08-09 17:11:08 +0000 |
commit | 3737b5eae3e09983b0b64d8f78fce92463957c16 (patch) | |
tree | ff410bcbc1767addd5f26ba881a2e769cb6502d7 | |
parent | 2bbb31a17ec0ba0b8b9e844ccdb275382ad5675c (diff) | |
download | perl-MDK-Common-3737b5eae3e09983b0b64d8f78fce92463957c16.tar perl-MDK-Common-3737b5eae3e09983b0b64d8f78fce92463957c16.tar.gz perl-MDK-Common-3737b5eae3e09983b0b64d8f78fce92463957c16.tar.bz2 perl-MDK-Common-3737b5eae3e09983b0b64d8f78fce92463957c16.tar.xz perl-MDK-Common-3737b5eae3e09983b0b64d8f78fce92463957c16.zip |
new check: never use ``length @l'', it returns the length of the string int(@l)
-rwxr-xr-x | perl_checker | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/perl_checker b/perl_checker index 7dca3ba..d1cd082 100755 --- a/perl_checker +++ b/perl_checker @@ -55,6 +55,10 @@ s{([!=]~|\bif\b)\s*/.*?/}{}g; s/#.*//; +if (/\blength(\s*|\()\@/) { + err(q(never use ``length @l'', it returns the length of the string int(@l)), info()); +} + if (/\blocal\b.*\|\|=/) { err(q(never use ``local $var ||= <val>'', write ``local $var = $var || <val>''), info()); } |