also portability improvements

Sat, 17 Feb 2018 02:30:35 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Sat, 17 Feb 2018 02:30:35 -0500
changeset 690
d005acd0e883
parent 689
840057d4b493
child 691
5e08af1add1e

also portability improvements

.lib/perl5/Autofetch.pm file | annotate | diff | comparison | revisions
.lib/perl5/ReplyStartup.pm file | annotate | diff | comparison | revisions
--- a/.lib/perl5/Autofetch.pm
+++ b/.lib/perl5/Autofetch.pm
@@ -10,7 +10,7 @@ sub fetch {
 }
 
 sub cachepath {
-  catfile($ENV{HOME}, '.cache', 'lib', rel2abs($_[0]) =~ y|/ |-_|r);
+  catfile(glob('~'), '.cache', 'lib', rel2abs($_[0]) =~ y|/ |-_|r);
 }
 
 sub modulefy { $_[0] =~ s/\.pm$//r =~ s|/|::|gr }
--- a/.lib/perl5/ReplyStartup.pm
+++ b/.lib/perl5/ReplyStartup.pm
@@ -11,7 +11,7 @@ sub import {
 
       use Path::Tiny;
 
-      -e \$_ && do(\$_) for "\$ENV{HOME}/.replyrc.local.pl";
+      -e \$_ && do(\$_) for glob('~/.replyrc.local.pl');
       die \$@ if \$@;
     }
 END_PERL

mercurial