From: Dave Rolsky Date: Fri, 5 Feb 2010 17:18:56 +0000 (-0600) Subject: Work with both newer and older CPAN versions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d580e02d5d42fe398dedab85e8a76785a6eb1465;p=gitmo%2Fmoose-presentations.git Work with both newer and older CPAN versions --- diff --git a/moose-class/exercises/install-moose b/moose-class/exercises/install-moose index 0d8379b..e347e3e 100755 --- a/moose-class/exercises/install-moose +++ b/moose-class/exercises/install-moose @@ -4,7 +4,12 @@ use Cwd qw( abs_path ); 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' ),