* [PATCH 6/7] config: remove try_cat
2016-05-28 1:57 7% [PATCH 0/7] miscellaneous cleanups Eric Wong
@ 2016-05-28 1:57 6% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-05-28 1:57 UTC (permalink / raw)
To: meta
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
^ permalink raw reply related [relevance 6%]
* [PATCH 0/7] miscellaneous cleanups
@ 2016-05-28 1:57 7% Eric Wong
2016-05-28 1:57 6% ` [PATCH 6/7] config: remove try_cat Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2016-05-28 1:57 UTC (permalink / raw)
To: meta
Only the last one (NewsGroup class removal for ::Inbox) is
likely to cause problems but I'll be checking logs for
errors.
Eric Wong (7):
t/plack: ensure we can cascade on common endpoints
http: clarify comments about layering violation
Makefile.PL: allow N to be overridden
examples: config no longer supports atomUrl
www: remove footer_html support
config: remove try_cat
remove redundant NewsGroup class
MANIFEST | 1 -
Makefile.PL | 2 +-
examples/public-inbox-config | 1 -
lib/PublicInbox/Config.pm | 49 +++++++++++++++-----------
lib/PublicInbox/HTTP.pm | 6 ++--
lib/PublicInbox/Inbox.pm | 17 ++++-----
lib/PublicInbox/NNTP.pm | 9 ++---
lib/PublicInbox/NNTPD.pm | 27 ++++----------
lib/PublicInbox/NewsGroup.pm | 84 --------------------------------------------
lib/PublicInbox/NewsWWW.pm | 38 ++------------------
lib/PublicInbox/WWW.pm | 6 ++--
t/config.t | 2 ++
t/nntp.t | 15 +++++---
t/nntpd.t | 4 ++-
t/plack.t | 12 +++++--
15 files changed, 83 insertions(+), 190 deletions(-)
^ permalink raw reply [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-05-28 1:57 7% [PATCH 0/7] miscellaneous cleanups Eric Wong
2016-05-28 1:57 6% ` [PATCH 6/7] config: remove try_cat Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).