CC: | NNIS-4986 [...] jira.noris.de |
Subject: | MIME::Parser::parse_date() should check what it gets back from IO::File |
Because that might be undef, and in that case you will get a strange error messages from MIME::Parser::Reader::native_handle() down the stack and wonder why:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
$ cat mp
#!/usr/bin/env perl
use 5.014;
use utf8;
use warnings;
use MIME::Parser;
say "Perl version: $]";
say 'MIME::Parser version: ', MIME::Parser->VERSION;
my $s = <<'_';
From: fany@cpan.org
Subject: Test
☺
_
my $p = MIME::Parser->new;
my $m = $p->parse_data($s);
$ ./mp
Perl version: 5.024000
MIME::Parser version: 5.508
Can't call method "isa" on an undefined value at /usr/local/lib/perl5/site_perl/5.24.0/MIME/Parser/Reader.pm line 186.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
BTW, the reason for the failure is:
fany@homer:~> perl -w mp
Perl version: 5.024000
MIME::Parser version: 5.508
Strings with code points over 0xFF may not be mapped into in-memory file handles
Can't call method "isa" on an undefined value at /usr/local/lib/perl5/site_perl/5.24.0/MIME/Parser/Reader.pm line 186.
So I think it's OK that it doesn't work; it just should notice that a bit earlier. :-)
Regards
fany