use PublicInbox::Hval;
use PublicInbox::GitCatFile;
use constant {
- DATEFMT => '%Y-%m-%dT%H:%M:%SZ',
- MAX_PER_PAGE => 25,
+ DATEFMT => '%Y-%m-%dT%H:%M:%SZ', # atom standard
+ MAX_PER_PAGE => 25, # this needs to be tunable
};
-# FIXME: workaround https://rt.cpan.org/Public/Bug/Display.html?id=22817
-
# main function
sub generate {
my ($class, $args) = @_;
sub generate_html_index {
my ($class, $args) = @_;
- require Mail::Thread;
+ require PublicInbox::Thread;
my $max = $args->{max} || MAX_PER_PAGE;
my $feed_opts = get_feedopts($args);
});
$git = undef; # destroy pipes.
- my $th = Mail::Thread->new(@messages);
+ my $th = PublicInbox::Thread->new(@messages);
$th->thread;
my $html = "<html><head><title>$title</title>" .
'<link rel="alternate" title="Atom feed" href="' .
defined $mid or return 0;
$mid = PublicInbox::Hval->new_msgid($mid);
my $href = $mid->as_href . '.html';
- my $content = PublicInbox::View->as_feed_entry($mime, $fullurl . $href);
+ my $content = PublicInbox::View->feed_entry($mime, $fullurl . $href);
defined($content) or return 0;
my $subject = mime_header($mime, 'Subject') or return 0;
sub do_cat_mail {
my ($git, $path) = @_;
my $str = $git->cat_file("HEAD:$path");
- Email::MIME->new($$str);
+ Email::MIME->new($str);
}
1;