summaryrefslogtreecommitdiffstats
path: root/perl_checker.src
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-03-31 14:11:26 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-03-31 14:11:26 +0000
commit5a13ba64777f14718ae20e4bca2a80f39304c367 (patch)
treee06833f4e6eee59bf456e115527fe46f51b9bf2d /perl_checker.src
parent4cdf703757880d32272b5e904103ad9079fa5b03 (diff)
downloadperl_checker-5a13ba64777f14718ae20e4bca2a80f39304c367.tar
perl_checker-5a13ba64777f14718ae20e4bca2a80f39304c367.tar.gz
perl_checker-5a13ba64777f14718ae20e4bca2a80f39304c367.tar.bz2
perl_checker-5a13ba64777f14718ae20e4bca2a80f39304c367.tar.xz
perl_checker-5a13ba64777f14718ae20e4bca2a80f39304c367.zip
in "$a ? $a : xxx", "xxx" can need short circuit
(even if i don't think any value which is_a_scalar can need_short_circuit)
Diffstat (limited to 'perl_checker.src')
-rw-r--r--perl_checker.src/parser_helper.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml
index b95622e..a60cb79 100644
--- a/perl_checker.src/parser_helper.ml
+++ b/perl_checker.src/parser_helper.ml
@@ -431,7 +431,7 @@ let check_ternary_paras(cond, a, b) =
in
if dont_need_short_circuit a || is_same_fromparser cond a then check_ternary_para b;
if dont_need_short_circuit b || is_same_fromparser cond b then check_ternary_para a;
- if is_same_fromparser cond a && dont_need_short_circuit b && is_a_scalar a && is_a_scalar b then warn_rule "you can replace \"$foo ? $foo : $bar\" with \"$foo || $bar\"";
+ if is_same_fromparser cond a && is_a_scalar a && is_a_scalar b then warn_rule "you can replace \"$foo ? $foo : $bar\" with \"$foo || $bar\"";
[ cond; a; b ]
let check_unneeded_var_dollar_ esp =