# Used by PublicInbox::WWW
package PublicInbox::WwwListing;
use strict;
+use v5.10.1;
use PublicInbox::Hval qw(prurl fmt_ts ascii_html);
use PublicInbox::Linkify;
use PublicInbox::GzipFilter qw(gzf_maybe);
use PublicInbox::ConfigIter;
use PublicInbox::WwwStream;
-use bytes (); # bytes::length
sub ibx_entry {
my ($ctx, $ibx, $ce) = @_;
} elsif ($v eq 'all') {
(qr/./, undef);
} elsif ($v eq '404') {
- undef;
+ (undef, undef);
} else {
warn <<EOF;
`$v' is not a valid value for `$key'
my $h = [ 'Content-Type', 'text/html; charset=UTF-8',
'Content-Length', undef ];
my $gzf = gzf_maybe($h, $ctx->{env});
- $gzf->zmore('<html><head><title>' .
- 'public-inbox listing</title>' .
- '</head><body>');
+ $gzf->zmore('<html><head><title>public-inbox listing</title>' .
+ $ctx->{www}->style('+/') .
+ '</head><body>');
my $code = 404;
if (my $list = delete $ctx->{-list}) {
my $mset = delete $ctx->{-mset};
my $out = $gzf->zflush('</pre><hr><pre>'.
PublicInbox::WwwStream::code_footer($ctx->{env}) .
'</pre></body></html>');
- $h->[3] = bytes::length($out);
+ $h->[3] = length($out);
[ $code, $h, [ $out ] ];
}