Subject: | Failed test 'The thing isa Mail::Outlook::Folder' |
Date: | Tue, 10 Jan 2012 15:12:26 +0000 |
To: | bug-Mail-Outlook [...] rt.cpan.org |
From: | Richard Copley <rcopley [...] gmail.com> |
CPAN installation of Mail-Outlook-0.15 on Strawberry Perl 5.12.3 on
Windows XP SP3 fails t/20folders.t.
Output from CPAN for that file of tests:
t/20folders.t ...... 1/12
# Failed test 'The thing isa Mail::Outlook::Folder'
# at t/20folders.t line 52.
# The thing isn't defined
# Looks like you failed 1 test of 12.
t/20folders.t ...... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests
We have (t/20folders.t, line 51):
eval "use Win32::OLE::Const 'Microsoft Outlook'";
# [...]
$folder = $outlook->folder(olFolderInbox);
isa_ok($folder,'Mail::Outlook::Folder');
That's a run-time "use" of the module that provides the olFolderInbox
constant, followed by an attempted usage of the constant at
compile-time. In fact, olFolderInbox is a bareword there, and since
there's no "use strict" (shame on you, Barbie!), the bareword is a
string. It is not a valid folder name, so $folder is set to undef and
the "isa_ok" fails.
I've never noticed this test failing before, but I don't believe it
could ever have passed. It looks as though there are tests earlier on
in 20folders.t which cause the rest of the file's tests to be skipped
if they fail. For example, if the first item in my Outlook inbox is
not a message (say, if it's a mail delivery failure notification) then
test 1/12 fails and the rest of the tests are skipped, so the module
gets installed successfully.
Regards,
Buster