diff options
author | Eric Wong <e@yhbt.net> | 2020-04-18 03:38:51 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-04-19 08:51:26 +0000 |
commit | c91490ccae1a1775da1e816866ef0b08b234ff54 (patch) | |
tree | b5ea5cbccce40c90ac3bd2a5656061ad31bd65cf /lib/PublicInbox/WwwAtomStream.pm | |
parent | a479b45117ed69d9311770fa39e6676d38f9cab2 (diff) | |
download | public-inbox-c91490ccae1a1775da1e816866ef0b08b234ff54.tar.gz |
There's no need to pollute the cross-package $ctx with it.
Diffstat (limited to 'lib/PublicInbox/WwwAtomStream.pm')
-rw-r--r-- | lib/PublicInbox/WwwAtomStream.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index aa917ed8..c3fbb1a7 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -20,9 +20,8 @@ sub close {} sub new { my ($class, $ctx, $cb) = @_; - $ctx->{emit_header} = 1; $ctx->{feed_base_url} = $ctx->{-inbox}->base_url($ctx->{env}); - bless { cb => $cb || \&close, ctx => $ctx }, $class; + bless { cb => $cb || \&close, ctx => $ctx, emit_header => 1 }, $class; } sub response { @@ -130,7 +129,7 @@ sub feed_entry { $email = ascii_html($email); my $s = ''; - if (delete $ctx->{emit_header}) { + if (delete $self->{emit_header}) { $s .= atom_header($ctx, $title); } $s .= "<entry><author><name>$name</name><email>$email</email>" . |