Skip to content

Commit

Permalink
Simplify getting our own package name, make it work on tlib too
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Melo <melo@simplicidade.org>
  • Loading branch information
melo committed Aug 5, 2012
1 parent 2a061df commit 5624c76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/x-perl-completions
Expand Up @@ -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;
Expand Down

0 comments on commit 5624c76

Please sign in to comment.