Sun, 18 Feb 2018 16:27:03 -0500
Actually just Import::Into
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(feature => $caller, ':5.14'); |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
11 | import::into($_ => $caller) for qw( |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
12 | strict |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
13 | warnings |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
14 | experimentals |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
15 | Path::Tiny |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
16 | ); |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
17 | |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
18 | # Run anything in .replyrc.local.pl in the context of |
4573c0ed4d0d
Actually just Import::Into
Meredith Howard <mhoward@roomag.org>
parents:
691
diff
changeset
|
19 | # main, at compile time. |
691
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
20 | eval(<<END_PERL)->(); |
5e08af1add1e
Let's use Import::Base
Meredith Howard <mhoward@roomag.org>
parents:
690
diff
changeset
|
21 | package $caller; sub { |
690
d005acd0e883
also portability improvements
Meredith Howard <mhoward@roomag.org>
parents:
683
diff
changeset
|
22 | -e \$_ && do(\$_) for glob('~/.replyrc.local.pl'); |
683 | 23 | die \$@ if \$@; |
24 | } | |
25 | END_PERL | |
26 | } | |
27 | ||
28 | 1; |