use CPAN;
use File::Spec;
-CPAN::Config->load;
+if ( CPAN::HandleConfig->can('load') ) {
+ CPAN::HandleConfig->load();
+}
+else {
+ CPAN::Config->load();
+}
-$CPAN::Config->{urllist} =
- [ 'file://' . File::Spec->catdir( abs_path(q{.}), 'moosepan' ),
- @{ $CPAN::Config->{urllist} } ];
+$CPAN::Config->{connect_to_internet_ok} = 0;
+$CPAN::Config->{urllist}
+ = [ 'file://' . File::Spec->catdir( abs_path(q{.}), 'moosepan' ) ];
CPAN::Shell->install('Moose');