Skip Menu |

This queue is for tickets about the Email-MIME-CreateHTML CPAN distribution.

Report information
The Basics
Id: 53921
Status: resolved
Priority: 0/
Queue: Email-MIME-CreateHTML

People
Owner: Nobody in particular
Requestors: Tom.Gebhardt [...] McKesson.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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.

Download image001.gif
image/gif 713b
image001.gif
Download MIS_email2.gif
image/gif 771b
MIS_email2.gif
This happens because the create_html method being mixed into Email::MIME does not have croak in scope. The fix is to simply explicitly load Carp again after the "package Email::MIME" declaration. I'm not sure exactly how this ever worked, honestly.
Subject: RE: [rt.cpan.org #53921] 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: Mon, 25 Jan 2010 16:56:23 -0500
To: bug-Email-MIME-CreateHTML [...] rt.cpan.org
From: "Gebhardt, Tom" <Tom.Gebhardt [...] McKesson.com>
thanks Tom Gebhardt Senior Network Engineer Technology Services Group T 404.338.2565 F 404.338.5178 C .. 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. Show quoted text
-----Original Message----- From: Dave Rolsky via RT [mailto:bug-Email-MIME-CreateHTML@rt.cpan.org] Sent: Monday, January 25, 2010 4:31 PM To: Gebhardt, Tom Subject: [rt.cpan.org #53921] 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"" <URL: https://rt.cpan.org/Ticket/Display.html?id=53921 > This happens because the create_html method being mixed into Email::MIME does not have croak in scope. The fix is to simply explicitly load Carp again after the "package Email::MIME" declaration. I'm not sure exactly how this ever worked, honestly.
I think this is a duplicate of #51208, which has been resolved with 1.030. Thanks for reporting.