summaryrefslogtreecommitdiffstats
path: root/perl_checker.src
diff options
context:
space:
mode:
Diffstat (limited to 'perl_checker.src')
-rw-r--r--perl_checker.src/parser_helper.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml
index 5a48a10..ac0223c 100644
--- a/perl_checker.src/parser_helper.ml
+++ b/perl_checker.src/parser_helper.ml
@@ -810,6 +810,13 @@ let call_raw is_a_func (e, para) =
| Anonymous_sub _ :: _ -> ()
| _ -> warn_rule (sprintf "always use \"%s\" with a block (eg: %s { ... } @list)" f f));
None
+
+ | "member" ->
+ (match para with
+ [ List [ _; Call(Deref(I_func, Ident(None, "keys", _)), _) ] ] ->
+ warn_rule "you can replace \"member($xxx, keys %yyy)\" with \"exists $yyy{$xxx}\""
+ | _ -> ());
+ None
| _ -> None
in Call(e, some_or para' para)