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; |
|