-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Email::MIME::Encode::maybe_mime_encode_header to work also withou…
…t explicit "use Email::MIME::Header" Email::MIME::Encode uses %Email::MIME::Header::header_to_class_map variable but have not loaded Email::MIME::Header module. This patch fixes it. Problem discovered by atoomic in report #52.
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use strict; | ||
use warnings; | ||
use utf8; | ||
use Test::More; | ||
|
||
BEGIN { | ||
plan skip_all => 'Email::Address::XS is required for this test' unless eval { require Email::Address::XS }; | ||
plan 'no_plan'; | ||
} | ||
|
||
BEGIN { | ||
use_ok('Email::MIME::Encode'); | ||
} | ||
|
||
is( | ||
Email::MIME::Encode::maybe_mime_encode_header('To', '"Name ☺" <user@host>'), | ||
'=?UTF-8?B?TmFtZSDimLo=?= <user@host>', | ||
'Email::MIME::Encode::maybe_mime_encode_header works without "use Email::MIME::Header"' | ||
); |