Skip to content

Commit

Permalink
Added github plugin: cpanm github:miyagawa/Plack
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Feb 22, 2010
1 parent c18bcd9 commit ccfd066
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/README
Expand Up @@ -2,7 +2,7 @@ Copy (or symlink) the plugins to ~/.cpanm/plugins

TODO/Ideas:
* fix cp562an to actually query the distribution (parse 02packages?)
* gitpan/backpan - get a specific version from BackPAN or GitPAN
* backpan - get a specific version from BackPAN
* nearest_mirror - automatically pick the nearest mirror (and cache it)
* test_reporter - report test success/failures
* local_lib - Something to do with local::lib. Maybe auto-setup?
Expand Down
13 changes: 13 additions & 0 deletions plugins/github
@@ -0,0 +1,13 @@
# NAME: github - Install distributions from github
# AUTHOR: Tatsuhiko Miyagawa
# SYNOPSIS: cpanm github:miyagawa/Plack

hook locate_dist => sub {
my $args = shift;

if (${$args->{module}} =~ s/^github://) {
my($who, $what, $tag) = split '/', ${$args->{module}};
$tag ||= 'master';
${$args->{module}} = "http://github.com/$who/$what/tarball/$tag";
}
};

0 comments on commit ccfd066

Please sign in to comment.