From 803af0b41639ce7f4976c7dca77367485473bb30 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 18 May 2016 02:27:07 +0000 Subject: feed: inline feed entry generation Remove unnecessary wrapper subroutines and constants which are only used once. --- lib/PublicInbox/Feed.pm | 6 +++--- lib/PublicInbox/Hval.pm | 1 - lib/PublicInbox/View.pm | 7 ------- 3 files changed, 3 insertions(+), 11 deletions(-) (limited to 'lib/PublicInbox') diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index 52fe0db4..0b864c2c 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -316,10 +316,10 @@ sub add_to_feed { defined $mid or return 0; $mid = PublicInbox::Hval->new_msgid($mid); my $href = $mid->as_href; - my $content = PublicInbox::View->feed_entry($mime); - defined($content) or return 0; - $mime = undef; + my $content = qq() . + PublicInbox::View::multipart_text_as_html($mime) . + ''; my $date = $header_obj->header('Date'); my $updated = feed_updated($date); diff --git a/lib/PublicInbox/Hval.pm b/lib/PublicInbox/Hval.pm index 70bae7c6..9ba78097 100644 --- a/lib/PublicInbox/Hval.pm +++ b/lib/PublicInbox/Hval.pm @@ -16,7 +16,6 @@ our @EXPORT_OK = qw/ascii_html/; # and screw up rendering on some browsers. This is the only CSS style # feature we use. use constant STYLE => ''; -use constant PRE => ""; # legacy my $enc_ascii = find_encoding('us-ascii'); diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 3fa7cfc2..2513cd0b 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -73,13 +73,6 @@ sub msg_reply { '
' . $footer .  '
'; } -sub feed_entry { - my ($class, $mime) = @_; - - # no here for