]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/TestCommon.pm
remove most internal Email::MIME usage
[public-inbox.git] / lib / PublicInbox / TestCommon.pm
index 600843f006663815a3b0f95b1f61a1c24dfa3899..d952ee6d97715fc644b1dcf0e663d977821c8413 100644 (file)
@@ -14,13 +14,15 @@ our @EXPORT = qw(tmpdir tcp_server tcp_connect require_git require_mods
 sub mime_load ($) {
        my ($path) = @_;
        open(my $fh, '<', $path) or die "open $path: $!";
+       # test should've called: require_mods('Email::MIME')
+       require PublicInbox::MIME;
        PublicInbox::MIME->new(\(do { local $/; <$fh> }));
 }
 
 sub eml_load ($) {
        my ($path, $cb) = @_;
        open(my $fh, '<', $path) or die "open $path: $!";
-       binmode $fh;
+       require PublicInbox::Eml;
        PublicInbox::Eml->new(\(do { local $/; <$fh> }));
 }