From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 1A2242017D for ; Wed, 15 Jun 2016 00:37:44 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/9] drop dependency on File::Path::Expand Date: Wed, 15 Jun 2016 00:37:34 +0000 Message-Id: <20160615003742.22538-2-e@80x24.org> In-Reply-To: <20160615003742.22538-1-e@80x24.org> References: <20160615003742.22538-1-e@80x24.org> List-Id: We still pull it in via Email::LocalDelivery, but that dependency will go away, soon. --- INSTALL | 1 - Makefile.PL | 1 - lib/PublicInbox/Config.pm | 3 +-- script/public-inbox-mda | 4 +--- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/INSTALL b/INSTALL index ca74c1c..25cc3c9 100644 --- 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: diff --git a/Makefile.PL b/Makefile.PL index 61cb77b..4f25312 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -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, diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index a8c5105..4651861 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -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}; diff --git a/script/public-inbox-mda b/script/public-inbox-mda index bb78c4e..84219ac 100755 --- a/script/public-inbox-mda +++ b/script/public-inbox-mda @@ -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);