summaryrefslogtreecommitdiffstats
path: root/perl_checker.src
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-04-09 14:37:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-04-09 14:37:41 +0000
commit1dd9c3640c7193ac37c32dfeb9985af18cff0a03 (patch)
tree46642a1a8051aeda72265d29563914bdf0710b80 /perl_checker.src
parent548f47f68ee0381f62e2200c9ee378d3f2d56e30 (diff)
downloadperl_checker-1dd9c3640c7193ac37c32dfeb9985af18cff0a03.tar
perl_checker-1dd9c3640c7193ac37c32dfeb9985af18cff0a03.tar.gz
perl_checker-1dd9c3640c7193ac37c32dfeb9985af18cff0a03.tar.bz2
perl_checker-1dd9c3640c7193ac37c32dfeb9985af18cff0a03.tar.xz
perl_checker-1dd9c3640c7193ac37c32dfeb9985af18cff0a03.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.ml6
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