diff --git a/.lib/perl5/ReplyStartup.pm b/.lib/perl5/ReplyStartup.pm --- a/.lib/perl5/ReplyStartup.pm +++ b/.lib/perl5/ReplyStartup.pm @@ -1,22 +1,29 @@ package ReplyStartup; +use warnings; +use strict; +use parent 'Import::Base'; + +our @IMPORT_MODULES = ( + 'strict', + 'warnings', + 'feature' => [':5.14'], + 'experimentals', + 'Path::Tiny', +); sub import { - my $code = eval(<import; - strict->import; - require feature; feature->import(':5.14'); - require experimentals; experimentals->import; + my $caller = caller(0); - use Path::Tiny; - + # Run anything in .replyrc.local.pl in the context of main, at compile time. + eval(<(); + package $caller; sub { -e \$_ && do(\$_) for glob('~/.replyrc.local.pl'); die \$@ if \$@; } END_PERL - $code->(); + our @ISA; + goto($ISA[0]->can('import')); } 1;