Work with both newer and older CPAN versions
[gitmo/moose-presentations.git] / moose-class / exercises / install-moose
CommitLineData
afaa1345 1#!/usr/bin/perl
2
3use Cwd qw( abs_path );
4use CPAN;
5use File::Spec;
6
d580e02d 7if ( CPAN::HandleConfig->can('load') ) {
8 CPAN::HandleConfig->load();
9}
10else {
11 CPAN::Config->load();
12}
afaa1345 13
14$CPAN::Config->{urllist} =
15 [ 'file://' . File::Spec->catdir( abs_path(q{.}), 'moosepan' ),
16 @{ $CPAN::Config->{urllist} } ];
17
18CPAN::Shell->install('Moose');
19