less magic

Fri, 09 Mar 2018 00:24:31 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 09 Mar 2018 00:24:31 -0500
changeset 698
e5389e9fdb82
parent 697
4fdde5f56193
child 699
46ba17d9a0f6

less magic

.lib/perl5/ReplyStartup.pm file | annotate | diff | comparison | revisions
.replyrc file | annotate | diff | comparison | revisions
.replyrc.pl file | annotate | diff | comparison | revisions
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(<<END_PERL)->();
-    package $caller; sub {
-      -e \$_ && do(\$_) for glob('~/.replyrc.local.pl');
-      die \$@ if \$@;
-    }
-END_PERL
-}
-
-1;
--- 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]
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;

mercurial