Thu, 08 Mar 2018 16:16:57 -0500
+x
683 | 1 | package ReplyStartup; |
691
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
2 | use warnings; |
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
3 | use strict; |
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
4 | |
692
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
5 | use Import::Into; |
683 | 6 | |
7 | sub import { | |
691
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
8 | my $caller = caller(0); |
683 | 9 | |
692
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
10 | import::into($_ => $caller) for qw( |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
11 | strict |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
12 | warnings |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
13 | experimentals |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
14 | Path::Tiny |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
15 | ); |
693
ef18d50728ef
make data-printer config private to Reply
Meredith Howard <mhoward@roomag.org>
parents:
692
diff
changeset
|
16 | import::into(feature => $caller, ':5.14'); |
ef18d50728ef
make data-printer config private to Reply
Meredith Howard <mhoward@roomag.org>
parents:
692
diff
changeset
|
17 | import::into('Data::Printer' => $caller, { |
ef18d50728ef
make data-printer config private to Reply
Meredith Howard <mhoward@roomag.org>
parents:
692
diff
changeset
|
18 | filters => {-external => ['JSON', 'URI']}, |
ef18d50728ef
make data-printer config private to Reply
Meredith Howard <mhoward@roomag.org>
parents:
692
diff
changeset
|
19 | class => {show_methods => 'public', inherited => 'public'}, |
ef18d50728ef
make data-printer config private to Reply
Meredith Howard <mhoward@roomag.org>
parents:
692
diff
changeset
|
20 | }); |
692
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
21 | |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
22 | # Run anything in .replyrc.local.pl in the context of |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
23 | # main, at compile time. |
691
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
24 | eval(<<END_PERL)->(); |
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
25 | package $caller; sub { |
690
d005acd0e883
also portability improvements
Meredith Howard <mhoward@roomag.org>
parents:
683
diff
changeset
|
26 | -e \$_ && do(\$_) for glob('~/.replyrc.local.pl'); |
683 | 27 | die \$@ if \$@; |
28 | } | |
29 | END_PERL | |
30 | } | |
31 | ||
32 | 1; |