Permalink
Browse files

Add panda list --installed, listing only installed modules

  • Loading branch information...
1 parent d678433 commit b37c7028ee37e10c363c86e2f2888d22d37e2874 @tadzik committed Aug 16, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 bin/panda
View
@@ -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

0 comments on commit b37c702

Please sign in to comment.