Permalink
Browse files

Simplify getting our own package name, make it work on tlib too

Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information...
1 parent 2a061df commit 5624c76b92a5372143044fdca50cc30e77ca9796 @melo committed Aug 5, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 bin/x-perl-completions
View
@@ -151,9 +151,7 @@ push @completions,
## Add package names for current module
push @modules, $source =~ m/^\s*package\s+(\S+)/gm if $source;
if ($file && $file =~ /[.]pm$/) {
- my ($lib, $module) = $file =~ m{^(.+/lib/)(.+)[.]pm$};
- ## TODO: if --scan-modules use $lib to scan for other modules in this
- ## project; do the same if /t/ is found
+ my ($module) = $file =~ m!/t?lib/(.+)[.]pm$!;
$module =~ s/\//::/g;
push @modules, $module;

0 comments on commit 5624c76

Please sign in to comment.