.lib/perl5/ReplyStartup.pm

changeset 698
e5389e9fdb82
parent 697
4fdde5f56193
child 699
46ba17d9a0f6
equal deleted inserted replaced
697:4fdde5f56193 698:e5389e9fdb82
1 package ReplyStartup;
2 use warnings;
3 use strict;
4
5 use Import::Into;
6
7 sub import {
8 my $caller = caller(0);
9
10 import::into($_ => $caller) for qw(
11 strict
12 warnings
13 experimentals
14 Path::Tiny
15 );
16 import::into(feature => $caller, ':5.14');
17 import::into('Data::Printer' => $caller, {
18 filters => {-external => ['JSON', 'URI']},
19 class => {show_methods => 'public', inherited => 'public'},
20 });
21
22 # Run anything in .replyrc.local.pl in the context of
23 # main, at compile time.
24 eval(<<END_PERL)->();
25 package $caller; sub {
26 -e \$_ && do(\$_) for glob('~/.replyrc.local.pl');
27 die \$@ if \$@;
28 }
29 END_PERL
30 }
31
32 1;

mercurial