]> Sergey Matveev's repositories - public-inbox.git/commitdiff
config: remove try_cat
authorEric Wong <e@80x24.org>
Sat, 28 May 2016 01:57:13 +0000 (01:57 +0000)
committerEric Wong <e@80x24.org>
Sat, 28 May 2016 01:57:38 +0000 (01:57 +0000)
It's moved into the Inbox module and we no longer use it
in WWW

lib/PublicInbox/Config.pm
lib/PublicInbox/WWW.pm

index 35b24af4567eeb83ae1458b06eb078278970c89c..317d290a4c36954c0688609dac91694832526d25 100644 (file)
@@ -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 = {};
index e8f1fbf0d49007fd2f1466b7511f23a9d5dc9bfa..ab3cd5d63e9794a71f2f08ff6c42efb157c3ef11 100644 (file)
@@ -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/';