X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FREPL%2FScript.pm;h=2b19440c38fcaaa2b1a0cc166cff97ee737363b0;hb=f109bc790c4450543e3bd07beb3abee5c4b923e0;hp=c748b95332ea90c02dac8ffacdcbd5b9789172b3;hpb=b595a818b1d89dbea55ace1af86d0df91c97ba0c;p=p5sagit%2FDevel-REPL.git diff --git a/lib/Devel/REPL/Script.pm b/lib/Devel/REPL/Script.pm index c748b95..2b19440 100644 --- a/lib/Devel/REPL/Script.pm +++ b/lib/Devel/REPL/Script.pm @@ -1,12 +1,16 @@ package Devel::REPL::Script; +our $VERSION = '1.003027'; + use Moose; use Devel::REPL; use File::HomeDir; use File::Spec; -use vars qw($CURRENT_SCRIPT); +use Module::Runtime 'use_module'; use namespace::autoclean; +our $CURRENT_SCRIPT; + with 'MooseX::Getopt'; has 'rcfile' => ( @@ -17,7 +21,7 @@ has 'rcfile' => ( has 'profile' => ( is => 'ro', isa => 'Str', - default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Default' }, + default => sub { $ENV{DEVEL_REPL_PROFILE} || 'Minimal' }, ); has '_repl' => ( @@ -34,7 +38,7 @@ sub BUILD { sub load_profile { my ($self, $profile) = @_; $profile = "Devel::REPL::Profile::${profile}" unless $profile =~ /::/; - Class::MOP::load_class($profile); + use_module $profile; confess "Profile class ${profile} doesn't do 'Devel::REPL::Profile'" unless $profile->does('Devel::REPL::Profile'); $profile->new->apply_profile($self->_repl);