Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add panda list --installed, listing only installed modules

  • Loading branch information...
commit b37c7028ee37e10c363c86e2f2888d22d37e2874 1 parent d678433
@tadzik authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 bin/panda
View
7 bin/panda
@@ -2,7 +2,7 @@
use Shell::Command;
use Panda;
-sub listprojects($panda) {
+sub listprojects($panda, :$installed) {
for $panda.ecosystem.project-list.sort -> $p {
my $x = $panda.ecosystem.get-project($p);
my $s;
@@ -11,6 +11,7 @@ sub listprojects($panda) {
when 'installed-dep' { $s = '[installed as a dependency]' }
default { $s = '' }
}
+ next if $installed and $s eq '';
printf "%-20s\t%s\n", $x.name, $s;
}
}
@@ -90,8 +91,8 @@ multi MAIN ('install', *@modules, Bool :$notests, Bool :$nodeps) {
}
#= List all available modules
-multi MAIN ('list') {
- listprojects($panda);
+multi MAIN ('list', Bool :$installed) {
+ listprojects($panda, :$installed);
}
#= Update the module database
Please sign in to comment.
Something went wrong with that request. Please try again.