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, URIBL_BLOCKED shortcircuit=no autolearn=unavailable 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 71D611FCFC for ; Sat, 28 May 2016 01:57:19 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 6/7] config: remove try_cat Date: Sat, 28 May 2016 01:57:13 +0000 Message-Id: <20160528015714.1325-7-e@80x24.org> In-Reply-To: <20160528015714.1325-1-e@80x24.org> References: <20160528015714.1325-1-e@80x24.org> List-Id: It's moved into the Inbox module and we no longer use it in WWW --- lib/PublicInbox/Config.pm | 12 ------------ lib/PublicInbox/WWW.pm | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 35b24af..317d290 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -5,8 +5,6 @@ package PublicInbox::Config; use strict; use warnings; -use base qw/Exporter/; -our @EXPORT_OK = qw/try_cat/; require PublicInbox::Inbox; use PublicInbox::Spawn qw(popen_rd); use File::Path::Expand qw/expand_filename/; @@ -101,16 +99,6 @@ sub git_config_dump { \%rv; } -sub try_cat { - my ($path) = @_; - my $rv; - if (open(my $fh, '<', $path)) { - local $/; - $rv = <$fh>; - } - $rv; -} - sub _fill { my ($self, $pfx) = @_; my $rv = {}; diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index e8f1fbf..ab3cd5d 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -14,7 +14,7 @@ use 5.008; use strict; use warnings; use Plack::Request; -use PublicInbox::Config qw(try_cat); +use PublicInbox::Config; use URI::Escape qw(uri_escape_utf8 uri_unescape); use constant SSOMA_URL => '//ssoma.public-inbox.org/'; use constant PI_URL => '//public-inbox.org/'; -- EW