Skip Menu |
 

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

Report information
The Basics
Id: 30236
Status: resolved
Priority: 0/
Queue: MIME-tools

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 5.421
  • 5.422
  • 5.423
Fixed in: (no value)



Subject: MIME::Body::InCore fails
Download (untitled) / with headers
text/plain 488b
5.421 has return IO::File->new(\($self->{MBS_Data}), $mode); where 5.420 has return new IO::Scalar \($self->{MBS_Data}); Now, my $b = MIME::Body::InCore->new(\"hi"); my $fh = $b->open("r"); print <$fh>; prints SCALAR(0x....) Where it previously did print the content of the message (as documented) The problem appears in standard functions like my $me = MIME::Entity->build ( From => 'me' , To => 'the users' , Data => [ <DATA> ] );
Subject: Re: [rt.cpan.org #30236] MIME::Body::InCore fails
Date: Wed, 24 Oct 2007 09:43:14 -0400
To: bug-MIME-tools [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Download (untitled) / with headers
text/plain 1.1k
Mark Overmeer via RT wrote: Show quoted text
> Now, > my $b = MIME::Body::InCore->new(\"hi"); > my $fh = $b->open("r"); > print <$fh>;
Show quoted text
> prints SCALAR(0x....)
I cannot replicate this with MIME-Tools 5.423. It prints the body as expected. This script I use is: #============================ use strict; use warnings; use MIME::Tools; use MIME::Body; my $b = MIME::Body::InCore->new(\"hi\n"); my $fh = $b->open("r"); print <$fh>; #============================ Please drop the following test case into the t/ directory and let me know what it does. Regards, David. ### Drop this in as t/BodyPrint.t #!/usr/bin/perl -w use strict; use warnings; use Test::More tests => 7; use MIME::Body; use MIME::Tools; my $body = MIME::Body::InCore->new("hi\n"); my $fh = $body->open("r"); my @ary = <$fh>; $fh->close(); is(scalar(@ary), 1); is($ary[0], "hi\n"); $body = MIME::Body::InCore->new(\"hi\n"); $fh = $body->open("r"); @ary = <$fh>; $fh->close(); is(scalar(@ary), 1); is($ary[0], "hi\n"); $body = MIME::Body::InCore->new(["line 1\n", "line 2\n"]); $fh = $body->open("r"); @ary = <$fh>; $fh->close(); is(scalar(@ary), 2); is($ary[0], "line 1\n"); is($ary[1], "line 2\n");
Subject: Re: [rt.cpan.org #30236] MIME::Body::InCore fails
Date: Wed, 24 Oct 2007 16:50:39 +0200
To: "David F. Skoll via RT" <bug-MIME-tools [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
Download (untitled) / with headers
text/plain 638b
* David F. Skoll via RT (bug-MIME-tools@rt.cpan.org) [071024 13:43]: Show quoted text
I must appologize: your change triggered a problem in my test code... I have to do nasty things to work around some tainting issues during tests :-( Sorry for abusing your time. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.