Courriel

 view release on metacpan or  search on metacpan

t/Headers.t  view on Meta::CPAN

    );

    like(
        $header->as_string,
        qr/
              \Q?UTF-8?B?\E
              \S+
              \s+
              \Q<autarch\E\@\Qurth.org>\E
          /x,
        'email address is not encoded but unicode content before it is when address has no UTF-8'
    );
}

{
    my $header = Courriel::Header->new(
        name  => 'To',
        value => q{Ďāᶌȩ ȒȯƖŝķẏ <āutarch@urth.org>},
    );

    like(
        $header->as_string,
        qr/
              \Q?UTF-8?B?\E
              \S+
              \s+
              \Q<āutarch\E\@\Qurth.org>\E
          /x,
        'email address is not encoded but unicode content before it is even when address has UTF-8'
    );
}

{
    my $header = Courriel::Header->new(
        name  => 'To',
        value =>
            q{Ďāᶌȩ ȒȯƖŝķẏ <āutarch@urth.org>, "Joe Smith" <joe@example.com>},
    );



( run in 0.426 second using v1.01-cache-2.11-cpan-88abd93f124 )