Skip to content

Instantly share code, notes, and snippets.

@bobtfish
Created May 29, 2009 09:36
Show Gist options
  • Select an option

  • Save bobtfish/119875 to your computer and use it in GitHub Desktop.

Select an option

Save bobtfish/119875 to your computer and use it in GitHub Desktop.
use strict;
use CPANPLUS::Backend;
my $cb = CPANPLUS::Backend->new;
my %seen;
for my $mod ($cb->search( type => 'package', allow => [qr/^CatalystX/] ) ) {
### returns a module object for each .pm in the package, so skip it if
### if we've already dealt with the package
next if $seen{ $mod->package }++;
print "Found: " . $mod->package . $/;
$mod->fetch; # download
$mod->extract; # untar
$mod->add_to_includepath; # add to @INC/PERL5LIB
}
10:35 < kane_> t0m: you can have: $mod->create; in ther etoo and then inspect $mod->status->prereqs
10:35 < Caelum> kane_: can it do something like "all dists that require Catalyst"
10:35 < kane_> if NEXT's in there, you'll be able to tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment