diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-04-09 14:37:41 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-04-09 14:37:41 +0000 |
commit | 6fd929fba1247185582aab4197476a9902f292a7 (patch) | |
tree | 5dbd5bb0034311ce021a37a37077cbc51e2fb3e2 /perl_checker.src | |
parent | acb3970811f051de693b0a3d77bfadd28fe72919 (diff) | |
download | perl-MDK-Common-6fd929fba1247185582aab4197476a9902f292a7.tar perl-MDK-Common-6fd929fba1247185582aab4197476a9902f292a7.tar.gz perl-MDK-Common-6fd929fba1247185582aab4197476a9902f292a7.tar.bz2 perl-MDK-Common-6fd929fba1247185582aab4197476a9902f292a7.tar.xz perl-MDK-Common-6fd929fba1247185582aab4197476a9902f292a7.zip |
handle "use Foo X.X" (where X.X is a version number requested)
Diffstat (limited to 'perl_checker.src')
-rw-r--r-- | perl_checker.src/tree.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl_checker.src/tree.ml b/perl_checker.src/tree.ml index f452971..b22868c 100644 --- a/perl_checker.src/tree.ml +++ b/perl_checker.src/tree.ml @@ -191,7 +191,11 @@ let get_uses t = | Use(Ident _ as pkg, _) when uses_external_package (string_of_Ident pkg) -> uses | Use(Ident(_, _, pos) as ident, l) -> let package = string_of_Ident ident in - let para = if l = [] then None else Some(collect from_qw l) in + let para = match l with + | [] -> None + | [ Num(_, _) ] -> None (* don't care about the version number *) + | _ -> Some(collect from_qw l) + in (package, (para, pos)) :: uses | _ -> uses ) [] t |