.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

package ReplyStartup;
use warnings;
use strict;

use Import::Into;

sub import {
  my $caller = caller(0);

  import::into(feature => $caller, ':5.14');
  import::into($_ => $caller) for qw(
    strict
    warnings
    experimentals
    Path::Tiny
  );

  # Run anything in .replyrc.local.pl in the context of
  # main, at compile time.
  eval(<<END_PERL)->();
    package $caller; sub {
      -e \$_ && do(\$_) for glob('~/.replyrc.local.pl');
      die \$@ if \$@;
    }
END_PERL
}

1;

mercurial