# Copyright (C) all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-# only loaded in lei
package PublicInbox::ContentDigestDbg; # cf. PublicInbox::ContentDigest
use v5.12;
use Data::Dumper;
use PublicInbox::MsgIter qw(msg_part_text);
use PublicInbox::ViewDiff qw(flush_diff);
use PublicInbox::GitAsyncCat;
+use PublicInbox::ContentDigestDbg;
sub write_part { # Eml->each_part callback
my ($ary, $self) = @_;
local $self->{curdir} = $dir;
mkdir $dir or die "mkdir($dir): $!";
$eml->each_part(\&write_part, $self);
-
- return if $self->{ctx}; # don't need content_digest noise in WWW UI
- require PublicInbox::ContentDigestDbg;
-
- # XXX is this even useful? perhaps hide it behind a CLI switch
open my $fh, '>', "$dir/content_digest" or die "open: $!";
my $dig = PublicInbox::ContentDigestDbg->new($fh);
content_digest($eml, $dig);