Subject: | String found where operator expected at /usr/local/lib/perl5/site_perl/5.10.1/Email/MIME/CreateHTML.pm line 203, near "croak "You must supply a body"" |
Date: | Fri, 22 Jan 2010 12:03:21 -0500 |
To: | bug-Email-MIME-CreateHTML [...] rt.cpan.org |
From: | "Gebhardt, Tom" <Tom.Gebhardt [...] McKesson.com> |
Running perl, v5.10.1 (*) built for i686-linux on Linux
reporter.carebridge.net 2.6.18-164.9.1.el5xen #1 SMP Wed Dec 9 04:03:20
EST 2009 i686 i686 i386 GNU/Linux.
I receive the below error from the test suite. The same error also
occurs from a small script I created (see bottom).
Installing Email::MIME::CreateHTML (1.026)
[MSG] Trying to get
'ftp://ftp.cpan.org/pub/CPAN/authors/id/B/BB/BBC/Email-MIME-CreateHTML-1
.026.tar.gz'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/pod_coverage.t'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_04a.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_04b.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_03b.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_03a.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_02b.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/landscape.jpg'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_02a.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/CreateHTML_01.html'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/end.png'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/data/test_style.css'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/t/Email-MIME-CreateHTML-Resolver.t'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/pod.t'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/t/Email-MIME-CreateHTML.t'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/lib/'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/lib/Email/'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/lib/Email/MIME/'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML/'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML/Resolver/'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML/Resolver/Cached.p
m'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML/Resolver/LWP.pm'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML/Resolver/Filesyst
em.pm'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML/Resolver.pm'
[MSG] Extracted
'Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML.pm'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/COPYING'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/Changes'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/MANIFEST'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/MANIFEST.SKIP'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/META.yml'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/README'
[MSG] Extracted 'Email-MIME-CreateHTML-1.026/Makefile.PL'
[MSG] Extracted 'Email::MIME::CreateHTML' to
'/root/.cpanplus/5.10.1/build/Email-MIME-CreateHTML-1.026'
Running [/usr/local/bin/perl /usr/bin/cpanp-run-perl
/root/.cpanplus/5.10.1/build/Email-MIME-CreateHTML-1.026/Makefile.PL]...
Writing Makefile for Email::MIME::CreateHTML
Running [/usr/bin/make UNINST=1]...
Skip blib/lib/Email/MIME/CreateHTML.pm (unchanged)
Skip blib/lib/Email/MIME/CreateHTML/Resolver.pm (unchanged)
Skip blib/lib/Email/MIME/CreateHTML/Resolver/Cached.pm (unchanged)
Skip blib/lib/Email/MIME/CreateHTML/Resolver/LWP.pm (unchanged)
Skip blib/lib/Email/MIME/CreateHTML/Resolver/Filesystem.pm (unchanged)
Manifying blib/man3/Email::MIME::CreateHTML.3
Manifying blib/man3/Email::MIME::CreateHTML::Resolver.3
Manifying blib/man3/Email::MIME::CreateHTML::Resolver::Cached.3
Manifying blib/man3/Email::MIME::CreateHTML::Resolver::LWP.3
Manifying blib/man3/Email::MIME::CreateHTML::Resolver::Filesystem.3
Running [/usr/bin/make test UNINST=1]...
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Email-MIME-CreateHTML-Resolver.t .. ok
String found where operator expected at ../lib/Email/MIME/CreateHTML.pm
line 203, near "croak "You must supply a body""
(Do you need to predeclare croak?)
syntax error at ../lib/Email/MIME/CreateHTML.pm line 203, near "croak
"You must supply a body""
Compilation failed in require at t/Email-MIME-CreateHTML.t line 29.
BEGIN failed--compilation aborted at t/Email-MIME-CreateHTML.t line 29.
# Looks like you planned 48 tests but actually ran 0.
t/Email-MIME-CreateHTML.t ...........
Dubious, test returned 9 (wstat 2304, 0x900)
Failed 48/48 subtests
t/pod.t ............................. ok
t/pod_coverage.t .................... skipped: Test::Pod::Coverage 1.00
required for testing POD Coverage
Test Summary Report
-------------------
t/Email-MIME-CreateHTML.t (Wstat: 2304 Tests: 0 Failed: 0)
Non-zero exit status: 9
Parse errors: Bad plan. You planned 48 tests but ran 0.
Files=4, Tests=19, 1 wallclock secs ( 0.01 usr 0.02 sys + 0.32 cusr 0.04
csys = 0.39 CPU)
Result: FAIL
Failed 1/4 test programs. 0/19 subtests failed.
make: *** [test_dynamic] Error 255
[ERROR] MAKE TEST failed: Bad file descriptor PERL_DL_NONLAZY=1
/usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/Email-MIME-CreateHTML-Resolver.t .. ok
String found where operator expected at ../lib/Email/MIME/CreateHTML.pm
line 203, near "croak "You must supply a body""
(Do you need to predeclare croak?)
syntax error at ../lib/Email/MIME/CreateHTML.pm line 203, near "croak
"You must supply a body""
Compilation failed in require at t/Email-MIME-CreateHTML.t line 29.
BEGIN failed--compilation aborted at t/Email-MIME-CreateHTML.t line 29.
# Looks like you planned 48 tests but actually ran 0.
t/Email-MIME-CreateHTML.t ...........
Dubious, test returned 9 (wstat 2304, 0x900)
Failed 48/48 subtests
t/pod.t ............................. ok
t/pod_coverage.t .................... skipped: Test::Pod::Coverage 1.00
required for testing POD Coverage
Test Summary Report
-------------------
t/Email-MIME-CreateHTML.t (Wstat: 2304 Tests: 0 Failed: 0)
Non-zero exit status: 9
Parse errors: Bad plan. You planned 48 tests but ran 0.
Files=4, Tests=19, 1 wallclock secs ( 0.01 usr 0.02 sys + 0.32 cusr 0.04
csys = 0.39 CPU)
Result: FAIL
Failed 1/4 test programs. 0/19 subtests failed.
make: *** [test_dynamic] Error 255
Problem also occurs from code snippet below:
use Email::MIME::CreateHTML;
my $html = qq{
<html><head><title>My Document</title></head><body>
<p>Here is a picture:</p><img src="cid:image1">
</body></html>
};
my $text = qq{
whatever text\n
};
my %objects = (
"image1" => "/usr/local/hboc/bin/xxx.jpg"
);
my $email = Email::MIME->create_html(
header => [
From => 'support@ <mailto:'support@xyz.net'> xyz.net',
To => 'tom@ <mailto:'tom@xyz.net'> xyz.net',
Subject => 'Testing Email::MIME',
],
body => $html,
text_body => "$text",
objects => \%objects
);
Tom Gebhardt
Senior Network Engineer
Technology Services Group
T 404.338.2565
F 404.338.5178
C ..
<http://www.mckesson.com/> www.mckesson.com
Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipient (s) and may contain
confidential and privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message.
Message body is not shown because it is too large.