Subject: | Mail::Address _tokenise(): "Unrecognised line: foo@bar.com" for UTF8 strings in 5.8.0 |
In Mail::Address, _tokenise() occasionally croaks with "unrecognised
line" under Perl 5.8.0 if the argument has its utf8 flag set (e.g. via
Encode::decode('utf8', $text)). This appears to be due to 5.8.0's buggy
handling of regex with utf8 strings.
Borrowing a fix from _extract_name() in Mail::Address appears to address
the issue:
sub _tokenise {
local($_) = join(',', @_);
# utf8 strings in 5.8.0 can trigger 'Unrecognised line' message
if($] eq 5.008) {
require utf8;
utf8::downgrade($_);
}
...
Best,
Josh