#!/usr/bin/env perl use Cwd qw( abs_path ); use CPAN; use File::Spec; if ( CPAN::HandleConfig->can('load') ) { CPAN::HandleConfig->load(); } else { CPAN::Config->load(); } $CPAN::Config->{connect_to_internet_ok} = 0; $CPAN::Config->{urllist} = [ 'file://' . File::Spec->catdir( abs_path(q{.}), 'moosepan' ) ]; CPAN::Shell->install('Moose');