t/convert-compact.t | 4 ++-- t/import.t | 3 ++- t/indexlevels-mirror.t | 4 ++-- t/msgtime.t | 5 +++-- t/psgi_v2.t | 8 ++++---- t/time.t | 4 ++-- t/v1-add-remove-add.t | 5 ++--- t/v1reindex.t | 5 ++--- t/v2-add-remove-add.t | 5 ++--- t/v2mda.t | 5 ++--- t/v2reindex.t | 4 ++-- t/v2writable.t | 4 ++-- t/xcpdb-reshard.t | 4 ++-- diff --git a/t/convert-compact.t b/t/convert-compact.t index af16b70143244cba7bf2b1eb2f642d19ef5271e3..376e0f6a8b15709bd15e9411e5660695f5377d0b 100644 --- a/t/convert-compact.t +++ b/t/convert-compact.t @@ -7,7 +7,7 @@ use PublicInbox::MIME; use PublicInbox::Spawn qw(which); use PublicInbox::TestCommon; require_git(2.6); -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); which('xapian-compact') or plan skip_all => 'xapian-compact missing for '.__FILE__; @@ -26,7 +26,7 @@ ok(PublicInbox::Import::run_die([qw(git) , "--git-dir=$ibx->{inboxdir}", qw(config core.sharedRepository 0644)]), 'set sharedRepository'); $ibx = PublicInbox::Inbox->new($ibx); my $im = PublicInbox::Import->new($ibx->git, undef, undef, $ibx); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/import.t b/t/import.t index 79af9846dce1eaed486b124fd03211615841073d..53345b12fb5b6ee54ec0b957028b3c7d9a54fc18 100644 --- a/t/import.t +++ b/t/import.t @@ -10,12 +10,13 @@ use PublicInbox::Spawn qw(spawn); use Fcntl qw(:DEFAULT SEEK_SET); use File::Temp qw/tempfile/; use PublicInbox::TestCommon; +require_mods(qw(Email::MIME)); my ($dir, $for_destroy) = tmpdir(); my $git = PublicInbox::Git->new($dir); my $im = PublicInbox::Import->new($git, 'testbox', 'test@example'); $im->init_bare; -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'b@example.com', diff --git a/t/indexlevels-mirror.t b/t/indexlevels-mirror.t index f220030607b21242c0c0e0d6ce9f40fbd976b619..90506e2846fc1aa428403c77d1439686d649672b 100644 --- a/t/indexlevels-mirror.t +++ b/t/indexlevels-mirror.t @@ -10,9 +10,9 @@ require PublicInbox::Admin; use PublicInbox::TestCommon; my $PI_TEST_VERSION = $ENV{PI_TEST_VERSION} || 2; require_git('2.6') if $PI_TEST_VERSION == 2; -require_mods(qw(DBD::SQLite)); +require_mods(qw(DBD::SQLite Email::MIME)); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/msgtime.t b/t/msgtime.t index 3f09fb4ef76ee0a915add8942136f0860c59ad2d..058f38864b9934061360ab717f347725f2e79538 100644 --- a/t/msgtime.t +++ b/t/msgtime.t @@ -6,12 +6,13 @@ use Test::More; use PublicInbox::MIME; use PublicInbox::MsgTime; use PublicInbox::TestCommon; +require_mods(qw(Email::MIME)); our $received_date = 'Mon, 22 Jan 2007 13:16:24 -0500'; sub datestamp ($) { my ($date) = @_; local $SIG{__WARN__} = sub {}; # Suppress warnings - my $mime = PublicInbox::MIME->create( + my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'b@example.com', @@ -34,7 +35,7 @@ sub timestamp ($) { my ($received) = @_; local $SIG{__WARN__} = sub {}; # Suppress warnings - my $mime = PublicInbox::MIME->create( + my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'b@example.com', diff --git a/t/psgi_v2.t b/t/psgi_v2.t index 57017de1afc4e941caa459af9278c758437086a3..bc26a1129364b0543c1e2995c170405a36d53755 100644 --- a/t/psgi_v2.t +++ b/t/psgi_v2.t @@ -9,7 +9,7 @@ use PublicInbox::MIME; use PublicInbox::Config; use PublicInbox::MID qw(mids); require_mods(qw(DBD::SQLite Search::Xapian HTTP::Request::Common Plack::Test - URI::Escape Plack::Builder)); + URI::Escape Plack::Builder Email::MIME)); use_ok($_) for (qw(HTTP::Request::Common Plack::Test)); use_ok 'PublicInbox::WWW'; use_ok 'PublicInbox::V2Writable'; @@ -226,11 +226,11 @@ # ensure conflicted attachments can be resolved foreach my $body (qw(old new)) { my $parts = [ - PublicInbox::MIME->create( + Email::MIME->create( attributes => { content_type => 'text/plain' }, body => 'blah', ), - PublicInbox::MIME->create( + Email::MIME->create( attributes => { filename => 'attach.txt', content_type => 'text/plain', @@ -238,7 +238,7 @@ }, body => $body ) ]; - $mime = PublicInbox::MIME->create( + $mime = Email::MIME->create( parts => $parts, header_str => [ From => 'root@z', 'Message-ID' => '', diff --git a/t/time.t b/t/time.t index 3cba3bd144c1b06a56a6a1967485f75c33a8fb84..94bf9181061bbce7d8f41a810a0b394e90af20fe 100644 --- a/t/time.t +++ b/t/time.t @@ -3,9 +3,9 @@ # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use_ok 'PublicInbox::MIME'; +use_ok 'Email::MIME'; use PublicInbox::MsgTime qw(msg_datestamp); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/v1-add-remove-add.t b/t/v1-add-remove-add.t index fdf06a96e764dc98c828dc4aef33da0de0a75ea7..c3a7e77f18b75607801fd1a8e9de875c942c60b7 100644 --- a/t/v1-add-remove-add.t +++ b/t/v1-add-remove-add.t @@ -3,10 +3,9 @@ # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use PublicInbox::MIME; use PublicInbox::Import; use PublicInbox::TestCommon; -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); require PublicInbox::SearchIdx; my ($inboxdir, $for_destroy) = tmpdir(); my $ibx = { @@ -15,7 +14,7 @@ name => 'test-add-remove-add', -primary_address => 'test@example.com', }; $ibx = PublicInbox::Inbox->new($ibx); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/v1reindex.t b/t/v1reindex.t index 378c8efb469baa852f34e7b58eef1be67424237e..ce3833be35696a8d325bf28540a4f2644870ee7e 100644 --- a/t/v1reindex.t +++ b/t/v1reindex.t @@ -3,12 +3,11 @@ # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use PublicInbox::MIME; use PublicInbox::ContentId qw(content_digest); use File::Path qw(remove_tree); use PublicInbox::TestCommon; require_git(2.6); -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); use_ok 'PublicInbox::SearchIdx'; use_ok 'PublicInbox::Import'; my ($inboxdir, $for_destroy) = tmpdir(); @@ -18,7 +17,7 @@ name => 'test-v1reindex', -primary_address => 'test@example.com', indexlevel => 'full', }; -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/v2-add-remove-add.t b/t/v2-add-remove-add.t index 328f5326e36231fd8845b31e233061774d9d6763..ca998334ce1a4510cf440c73e2abd18d4ce522a9 100644 --- a/t/v2-add-remove-add.t +++ b/t/v2-add-remove-add.t @@ -3,10 +3,9 @@ # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use PublicInbox::MIME; use PublicInbox::TestCommon; require_git(2.6); -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); use_ok 'PublicInbox::V2Writable'; my ($inboxdir, $for_destroy) = tmpdir(); my $ibx = { @@ -16,7 +15,7 @@ version => 2, -primary_address => 'test@example.com', }; $ibx = PublicInbox::Inbox->new($ibx); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/v2mda.t b/t/v2mda.t index e9dcdf44df8eb307506cefddb729f209ce378cd6..94b63310b5a30bab420eb0cb31ef7c6a91ecde89 100644 --- a/t/v2mda.t +++ b/t/v2mda.t @@ -3,14 +3,13 @@ # License: AGPL-3.0+ use strict; use warnings; use Test::More; -use PublicInbox::MIME; use Fcntl qw(SEEK_SET); use Cwd; use PublicInbox::TestCommon; require_git(2.6); my $V = 2; -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); use_ok 'PublicInbox::V2Writable'; my ($tmpdir, $for_destroy) = tmpdir(); my $ibx = { @@ -18,7 +17,7 @@ inboxdir => "$tmpdir/inbox", name => 'test-v2writable', address => [ 'test@example.com' ], }; -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/v2reindex.t b/t/v2reindex.t index b6164ff810febd2936236e7ac2bd42f0d2e3bdc8..7bf6bc2f935f7f3ce9923d4a7b249b62dc5cb640 100644 --- a/t/v2reindex.t +++ b/t/v2reindex.t @@ -8,7 +8,7 @@ use PublicInbox::ContentId qw(content_digest); use File::Path qw(remove_tree); use PublicInbox::TestCommon; require_git(2.6); -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); use_ok 'PublicInbox::V2Writable'; my ($inboxdir, $for_destroy) = tmpdir(); my $ibx_config = { @@ -24,7 +24,7 @@ local $/; <$fh>; }; my $phrase = q("defending all users' freedom"); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/v2writable.t b/t/v2writable.t index 8897062abfd04a2d8dbf51da5a2a16fc74145628..7e7560b39b19446378c83baa9142809458e2d877 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -8,7 +8,7 @@ use PublicInbox::ContentId qw(content_digest content_id); use PublicInbox::TestCommon; use Cwd qw(abs_path); require_git(2.6); -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); local $ENV{HOME} = abs_path('t'); use_ok 'PublicInbox::V2Writable'; umask 007; @@ -20,7 +20,7 @@ version => 2, -primary_address => 'test@example.com', }; $ibx = PublicInbox::Inbox->new($ibx); -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com', diff --git a/t/xcpdb-reshard.t b/t/xcpdb-reshard.t index 58932fc2ae87b8bf54973c07c11f42e7b77811c9..2571329e51ec5e89729aefa72212b2c0b48c4e7b 100644 --- a/t/xcpdb-reshard.t +++ b/t/xcpdb-reshard.t @@ -4,13 +4,13 @@ use strict; use warnings; use Test::More; use PublicInbox::TestCommon; -require_mods(qw(DBD::SQLite Search::Xapian)); +require_mods(qw(DBD::SQLite Search::Xapian Email::MIME)); require_git('2.6'); use PublicInbox::MIME; use PublicInbox::InboxWritable; require PublicInbox::Search; -my $mime = PublicInbox::MIME->create( +my $mime = Email::MIME->create( header => [ From => 'a@example.com', To => 'test@example.com',