summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Reply/Plugin/Autocomplete/Packages.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Reply/Plugin/Autocomplete/Packages.pm b/lib/Reply/Plugin/Autocomplete/Packages.pm
index d247baa..6e6037d 100644
--- a/lib/Reply/Plugin/Autocomplete/Packages.pm
+++ b/lib/Reply/Plugin/Autocomplete/Packages.pm
@@ -43,7 +43,19 @@ sub tab_handler {
}
}
+ push @results,
+ grep m/^\Q$package_fragment/,
+ @{$self->{moar_packages}||=[]};
+
return @results;
}
+# listen for events from the Packages plugin, for its wise wisdom
+# can teach us about packages that are not in %INC
+sub package {
+ my $self = shift;
+ my ($pkg) = @_;
+ push @{$self->{moar_packages}||=[]}, $pkg;
+}
+
1;