.lib/perl5/ReplyStartup.pm

Sun, 18 Feb 2018 16:27:03 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sun, 18 Feb 2018 16:27:03 -0500
changeset 692
4573c0ed4d0d
parent 691
5e08af1add1e
child 693
ef18d50728ef
permissions
-rw-r--r--

Actually just Import::Into

683
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
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
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
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
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
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
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
23 die \$@ if \$@;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
24 }
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
25 END_PERL
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
26 }
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
27
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
28 1;

mercurial