]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwAtomStream.pm
treewide: "require" + "use" cleanup and docs
[public-inbox.git] / lib / PublicInbox / WwwAtomStream.pm
index 05659f1fad7e2355cdd3052f1e597daebee54449..9430dd97679eed5049d65de63bc96129b8159b27 100644 (file)
@@ -13,7 +13,7 @@ use POSIX qw(strftime);
 use Digest::SHA qw(sha1_hex);
 use PublicInbox::Address;
 use PublicInbox::Hval qw(ascii_html);
-use PublicInbox::MID qw/mid_clean mid_escape/;
+use PublicInbox::MID qw(mid_escape);
 use PublicInbox::MsgTime qw(msg_timestamp);
 
 # called by PSGI server after getline:
@@ -36,7 +36,7 @@ sub response {
 sub getline {
        my ($self) = @_;
        if (my $middle = $self->{cb}) {
-               my $smsg = $middle->();
+               my $smsg = $middle->($self->{ctx});
                return feed_entry($self, $smsg) if $smsg;
        }
        delete $self->{cb} ? '</feed>' : undef;
@@ -84,7 +84,7 @@ sub atom_header {
                $self_url .= 'new.atom';
                $page_id = "mailto:$ibx->{-primary_address}";
        }
-       my $mtime = (stat($ibx->{mainrepo}))[9] || time;
+       my $mtime = (stat($ibx->{inboxdir}))[9] || time;
 
        qq(<?xml version="1.0" encoding="us-ascii"?>\n) .
        qq(<feed\nxmlns="http://www.w3.org/2005/Atom"\n) .