# HG changeset patch # User Meredith Howard # Date 1520573071 18000 # Node ID e5389e9fdb826e980ab801cad4655342874c4820 # Parent 4fdde5f56193e7bb6fb6d017f58553afdbc6e5a8 less magic diff --git a/.lib/perl5/ReplyStartup.pm b/.lib/perl5/ReplyStartup.pm deleted file mode 100644 --- a/.lib/perl5/ReplyStartup.pm +++ /dev/null @@ -1,32 +0,0 @@ -package ReplyStartup; -use warnings; -use strict; - -use Import::Into; - -sub import { - my $caller = caller(0); - - import::into($_ => $caller) for qw( - strict - warnings - experimentals - Path::Tiny - ); - import::into(feature => $caller, ':5.14'); - import::into('Data::Printer' => $caller, { - filters => {-external => ['JSON', 'URI']}, - class => {show_methods => 'public', inherited => 'public'}, - }); - - # 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 -} - -1; diff --git a/.replyrc b/.replyrc --- a/.replyrc +++ b/.replyrc @@ -1,4 +1,4 @@ -script_line1 = use lib glob('~/.lib/perl5'); use ReplyStartup; +script_line1 = require glob('~/.replyrc.pl'); () [Colors] [DataPrinter] diff --git a/.replyrc.pl b/.replyrc.pl new file mode 100644 --- /dev/null +++ b/.replyrc.pl @@ -0,0 +1,17 @@ +use warnings; +use strict; +use feature ':all'; +use experimentals; + +use lib glob('~/.lib/perl5'); + +use Data::Printer { + filters => {-external => ['JSON', 'URI']}, + class => {show_methods => 'public', inherited => 'public'}, +}; + +use Path::Tiny; + +-e $_ && require($_) for glob('~/.replyrc.local.pl'); + +1;