Skip Menu |
 

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

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

People
Owner: dfs+pause [...] roaringpenguin.com
Requestors: mark.solinski [...] gpsinsight.com
Cc:
AdminCc:

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



Subject: Test t/Ref.t fails on Windows install
Date: Tue, 4 Oct 2016 19:44:43 +0000
To: "bug-MIME-tools [...] rt.cpan.org" <bug-MIME-tools [...] rt.cpan.org>
From: Mark Solinski <mark.solinski [...] gpsinsight.com>
Download (untitled) / with headers
text/plain 1.1k
Hello, There is a hack (labeled as such in t/Ref.h) which looks like this: ### HACK HACK HACK: MailTools behaviour has changed!!! if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) { $refpath = 'testmsgs/hdr-fakeout-newmailtools-ref'; } The problem is the test "$msgpath eq 'testmsgs/hdr-fakeout.msg'" which when executed via the Windows (command) shell, will always fail. This is because, on Windows, the $msgpath variable will look something like "testmsgs\\hdr-fakeout.msg". On the Windows platform, the standard path separator is '\' and not '/'. Since Windows can use either separators, a fix will require, either that $msgpath only uses the '/' separator or the comparison needs to be relaxed to handle both separators. When I insured that $msgpath only used the '/' separator (and $::Mail::Header::VERSION was equal to 2.18), $refpath was set and all the tests passed. Mark Solinski | Back End Development Manager GPS Insight 7201 E. Henkel Way, Suite 400 | Scottsdale, AZ 85255 866.477.4321 Office x8596 480.513.1694 Fax 847.338.2006 Mobile gpsinsight.com [../Desktop/gpsi_logo_flat.jpg]
Download image001.jpg
image/jpeg 15.2k
image001.jpg
Subject: Re: [rt.cpan.org #118262] Test t/Ref.t fails on Windows install
Date: Tue, 4 Oct 2016 16:42:50 -0400
To: bug-MIME-tools [...] rt.cpan.org
From: Dianne Skoll <dfs [...] roaringpenguin.com>
Download (untitled) / with headers
text/plain 680b
Hi, Show quoted text
> There is a hack (labeled as such in t/Ref.h) which looks like this:
Oh, I see. Does this patch-to-a-hack fix things on Windows? Regards, Dianne. diff --git a/t/Ref.t b/t/Ref.t index d39d20b..7d89b32 100644 --- a/t/Ref.t +++ b/t/Ref.t @@ -40,7 +40,8 @@ foreach my $refpath (@refpaths) { # print STDERR " $msgpath\n"; ### HACK HACK HACK: MailTools behaviour has changed!!! - if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) { + if ($msgpath =~ /hdr-fakeout.msg$/ && + $::Mail::Header::VERSION > 2.14) { $refpath = 'testmsgs/hdr-fakeout-newmailtools-ref'; } ### Get reference, as ref to array:
Subject: RE: [rt.cpan.org #118262] Test t/Ref.t fails on Windows install
Date: Tue, 4 Oct 2016 21:59:42 +0000
To: "bug-MIME-tools [...] rt.cpan.org" <bug-MIME-tools [...] rt.cpan.org>
From: Mark Solinski <mark.solinski [...] gpsinsight.com>
Download (untitled) / with headers
text/plain 1.1k
Yes. With that patch-to-a-hack, all tests pass on Windows (Perl 5.22.1, MSWin32-x64-multi-thread). Thanks, Mark Show quoted text
-----Original Message----- From: Dianne Skoll via RT [mailto:bug-MIME-tools@rt.cpan.org] Sent: Tuesday, October 04, 2016 1:44 PM To: Mark Solinski <mark.solinski@gpsinsight.com> Subject: Re: [rt.cpan.org #118262] Test t/Ref.t fails on Windows install <URL: https://rt.cpan.org/Ticket/Display.html?id=118262 > Hi,
> There is a hack (labeled as such in t/Ref.h) which looks like this:
Oh, I see. Does this patch-to-a-hack fix things on Windows? Regards, Dianne. diff --git a/t/Ref.t b/t/Ref.t index d39d20b..7d89b32 100644 --- a/t/Ref.t +++ b/t/Ref.t @@ -40,7 +40,8 @@ foreach my $refpath (@refpaths) { # print STDERR " $msgpath\n"; ### HACK HACK HACK: MailTools behaviour has changed!!! - if ($msgpath eq 'testmsgs/hdr-fakeout.msg' && $::Mail::Header::VERSION > 2.14) { + if ($msgpath =~ /hdr-fakeout.msg$/ && + $::Mail::Header::VERSION > 2.14) { $refpath = 'testmsgs/hdr-fakeout-newmailtools-ref'; } ### Get reference, as ref to array:
Hi Dianne, Could you please release a new MIME::Tools version with that patch? Thank you
Download (untitled) / with headers
text/plain 202b
On Sat Mar 18 18:46:56 2017, XENU wrote: Show quoted text
> Hi Dianne, > > Could you please release a new MIME::Tools version with that patch? > > Thank you
I ran into this issue as well. A new release would help :)
Download (untitled) / with headers
text/plain 149b
Hi, I've released version 5.509 of MIME::tools at http://search.cpan.org/~dskoll/MIME-tools-5.509/ I believe it fixes this bug. Regards, Dianne.


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.