]> Sergey Matveev's repositories - public-inbox.git/commitdiff
drop dependency on File::Path::Expand
authorEric Wong <e@80x24.org>
Wed, 15 Jun 2016 00:14:21 +0000 (00:14 +0000)
committerEric Wong <e@80x24.org>
Wed, 15 Jun 2016 00:15:04 +0000 (00:15 +0000)
We still pull it in via Email::LocalDelivery, but that
dependency will go away, soon.

INSTALL
Makefile.PL
lib/PublicInbox/Config.pm
script/public-inbox-mda

diff --git a/INSTALL b/INSTALL
index ca74c1cc71cedc3d52144a1cdd54cd7c33f22ddd..25cc3c9c4046872225983f539a6ed772c7372849 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -32,7 +32,6 @@ Requirements (server MDA)
   - Email::MIME                libemail-mime-perl
   - Email::MIME::ContentType   libemail-mime-contenttype-perl
   - Encode::MIME::Header       perl
-  - File::Path::Expand         libfile-path-expand-perl
   - IPC::Run                   libipc-run-perl
 
 Optional modules:
index 61cb77b6ce7c5a8e9c7758d9f6f90db20c8b8795..4f253125d55fd3d5bbf961c1a74cf6e6dbdb9798 100644 (file)
@@ -23,7 +23,6 @@ WriteMakefile(
                'Email::MIME::ContentType' => 0,
                'Email::Simple' => 0,
                'Encode::MIME::Header' => 0,
-               'File::Path::Expand' => 0,
                'IPC::Run' => 0,
                'Mail::Thread' => '2.5', # 2.5+ needed for Email::Simple compat
                'Plack' => 0,
index a8c5105e636b50a2866860d686d7e4bb1eab16da..4651861d215229fe6e53d5ca7f9886d395d3a2fe 100644 (file)
@@ -7,7 +7,6 @@ use strict;
 use warnings;
 require PublicInbox::Inbox;
 use PublicInbox::Spawn qw(popen_rd);
-use File::Path::Expand qw/expand_filename/;
 
 # returns key-value pairs of config directives in a hash
 # if keys may be multi-value, the value is an array ref containing all values
@@ -82,7 +81,7 @@ sub get {
        $self->{"publicinbox.$inbox.$key"};
 }
 
-sub config_dir { $ENV{PI_DIR} || expand_filename('~/.public-inbox') }
+sub config_dir { $ENV{PI_DIR} || "$ENV{HOME}/.public-inbox" }
 
 sub default_file {
        my $f = $ENV{PI_CONFIG};
index bb78c4e605ff72fa13619e1d7e1206a5c88f9925..84219ac3c2531dcd9cbc98800b7e42f673d6ed2a 100755 (executable)
@@ -11,7 +11,6 @@ use Email::Filter;
 use Email::MIME;
 use Email::MIME::ContentType;
 $Email::MIME::ContentType::STRICT_PARAMS = 0; # user input is imperfect
-use File::Path::Expand qw/expand_filename/;
 use IPC::Run qw(run);
 use PublicInbox::MDA;
 use PublicInbox::Filter;
@@ -22,8 +21,7 @@ use PublicInbox::Git;
 # n.b: hopefully we can setup the emergency path without bailing due to
 # user error, we really want to setup the emergency destination ASAP
 # in case there's bugs in our code or user error.
-my $emergency = $ENV{PI_EMERGENCY} || '~/.public-inbox/emergency/';
-$emergency = expand_filename($emergency);
+my $emergency = $ENV{PI_EMERGENCY} || "$ENV{HOME}/.public-inbox/emergency/";
 
 # this reads the message from stdin
 my $filter = Email::Filter->new(emergency => $emergency);