diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-08-11 02:11:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-08-11 02:11:29 +0000 |
commit | 5a52635cb5b6830442ab350b8855b4e8115bca9e (patch) | |
tree | 904b49aafe73d8aca041eade5a7dce0ebe45cbb4 /perl_checker.src/parser_helper.ml | |
parent | b9c762fe0077a6de3e0fc10aa86a8eea9f1a2af5 (diff) | |
download | perl-MDK-Common-5a52635cb5b6830442ab350b8855b4e8115bca9e.tar perl-MDK-Common-5a52635cb5b6830442ab350b8855b4e8115bca9e.tar.gz perl-MDK-Common-5a52635cb5b6830442ab350b8855b4e8115bca9e.tar.bz2 perl-MDK-Common-5a52635cb5b6830442ab350b8855b4e8115bca9e.tar.xz perl-MDK-Common-5a52635cb5b6830442ab350b8855b4e8115bca9e.zip |
- allow $_o_XXX parameter name which is both unused and optional (same for $_b_XXX)
- shift is a ONE_SCALAR_PARA so that $box->pack_start(shift @l, 0, 0, 4) is parsed correctly
- in arrange_global_vars_declared(), don't keep anything in global_vars_declared, better
create shadow packages to contain them
- much better merging of multiple files defining functions in the same package.
This fixes the bad behaviour when using the cache (esp. do_pkgs, but it was even worse
with things in ugtk2.pm)
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r-- | perl_checker.src/parser_helper.ml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml index bdf3d49..69627e6 100644 --- a/perl_checker.src/parser_helper.ml +++ b/perl_checker.src/parser_helper.ml @@ -835,8 +835,11 @@ let call_one_scalar_para { any = e ; pos = pos } para esp_start esp_end = let para = match para with | [] -> - if not (List.mem e [ "length" ]) then warn_rule (sprintf "please use \"%s $_\" instead of \"%s\"" e e) ; - [var_dollar_ (raw_pos2pos pos)] + if e = "shift" then + [ Deref(I_array, Ident(None, "_", raw_pos2pos pos)) ] + else + (if not (List.mem e [ "length" ]) then warn_rule (sprintf "please use \"%s $_\" instead of \"%s\"" e e) ; + [var_dollar_ (raw_pos2pos pos)]) | _ -> para in new_pesp M_unknown P_mul (call(Deref(I_func, Ident(None, e, raw_pos2pos pos)), para)) esp_start esp_end |