.lib/perl5/ReplyStartup.pm

Sat, 17 Feb 2018 02:05:23 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 17 Feb 2018 02:05:23 -0500
changeset 685
691e15efff36
parent 683
ea343e7d3abc
child 690
d005acd0e883
permissions
-rw-r--r--

add a few more files to copy, simplify

683
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
1 package ReplyStartup;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
2
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
3 sub import {
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
4 my $code = eval(<<END_PERL) or die $@;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
5 package main;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
6 sub {
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
7 warnings->import;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
8 strict->import;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
9 require feature; feature->import(':5.14');
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
10 require experimentals; experimentals->import;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
11
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
12 use Path::Tiny;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
13
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
14 -e \$_ && do(\$_) for "\$ENV{HOME}/.replyrc.local.pl";
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
15 die \$@ if \$@;
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
16 }
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
17 END_PERL
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
18
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
19 $code->();
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
20 }
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
21
ea343e7d3abc move reply startup
Meredith Howard <mhoward@roomag.org>
parents:
diff changeset
22 1;

mercurial