From 1761fba7befab2681276ac8f123593610ad27e58 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 22 Aug 2015 08:00:37 +0000 Subject: remove XML::Atom::SimpleFeed dependency We will attempt to generate Atom feeds "by hand" as the XML::Atom::SimpleFeed API does not support streaming output. Since email is large and servers are small, this should prevent wasting memory when we generate larger feeds. Of course, we hope clients use SAX parsers capable of handling large streams without slurping. --- lib/PublicInbox/WWW.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/WWW.pm') diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index 54f63991..30a7a436 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -81,7 +81,6 @@ sub preload { require Email::MIME; require Digest::SHA; require POSIX; - require XML::Atom::SimpleFeed; eval { require PublicInbox::Search; @@ -120,11 +119,10 @@ sub invalid_list_mid { # /$LISTNAME/atom.xml -> Atom feed, includes replies sub get_atom { my ($ctx, $cgi) = @_; - require PublicInbox::Feed; $ctx->{pi_config} = $pi_config; $ctx->{cgi} = $cgi; - [ 200, [ 'Content-Type' => 'application/xml' ], - [ PublicInbox::Feed->generate($ctx) ] ] + require PublicInbox::Feed; + PublicInbox::Feed::generate($ctx); } # /$LISTNAME/?r=$GIT_COMMIT -> HTML only -- cgit v1.2.3-24-ge0c7