diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-02 11:26:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-02 11:26:29 +0000 |
commit | ee7cf6262287e1626d94fab23d731baced96969f (patch) | |
tree | 4735785e684ae356f77a4b5cbc2e69fd218b0449 /perl_checker.src | |
parent | ccb5e4ddcfd11264f92f4824074441e42ff16ac0 (diff) | |
download | perl-MDK-Common-ee7cf6262287e1626d94fab23d731baced96969f.tar perl-MDK-Common-ee7cf6262287e1626d94fab23d731baced96969f.tar.gz perl-MDK-Common-ee7cf6262287e1626d94fab23d731baced96969f.tar.bz2 perl-MDK-Common-ee7cf6262287e1626d94fab23d731baced96969f.tar.xz perl-MDK-Common-ee7cf6262287e1626d94fab23d731baced96969f.zip |
enhance warning "... =~ /^foo$/" is better written "... eq 'foo'"
Diffstat (limited to 'perl_checker.src')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index 21f91d8..d5869ec 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -428,7 +428,7 @@ let check_simple_pattern = function st.[0] = '^' && st.[String.length st - 1] = '$' then let st = skip_n_char_ 1 1 st in if string_forall_with char_is_alphanumerical_ 0 st then - warn_rule (sprintf "\"... =~ /^%s$/\" is better written \"... eq %s\"" st st) + warn_rule (sprintf "\"... =~ /^%s$/\" is better written \"... eq '%s'\"" st st) | _ -> () let rec only_one (l, (spaces, pos)) = |