Skip Menu |

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

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

People
Owner: dfs+pause [...] roaringpenguin.com
Requestors: MITHALDU [...] cpan.org
Cc:
AdminCc:

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



Subject: lack of module_name breaks its use in tools like Carton + patch
Tools like Carton rely on being able to tell from the metadata of a distribution what the main module of a dist is to be able to later request that module from the CPAN package index and select the right dist to install. In the case of MIME-tools this means that Carton tries to glean this information from the Makefile, generated by Module::Install. Module::Install inserts the relevant bit of information by first looking for a module_name value being provided in Makefile.PL and then using the name value, replacing - with ::, resulting in the rather unfortunate: MIME::tools This is not a package indexed by CPAN, so further attempts to install/ upgrade it via Carton will fail, leaving no choice but to manually fiddle with carton.lock and making sure to remember on each commit to not let it change the module entry from MIME::Parser to MIME::tools. Normally a decent way to fix it would be to change the name from MIME-tools to MIME::Tools, however i think this might cause issues, since it's not in sync with the dist file name. As such adding a module_name entry to Makefile.PL seems to be the correct solution. As follows the proposed patch: diff --git a/Makefile.PL b/Makefile.PL index 65e0f79..0e54425 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -3,6 +3,7 @@ use warnings; use inc::Module::Install; name 'MIME-tools'; +module_name 'MIME::Tools'; version_from 'lib/MIME/Tools.pm'; author q{Eryq <eryq@zeegee.com>, David F. Skoll <dfs@roaringpenguin.com>, Dave O'Neill <dmo@roaringpenguin.com>}; abstract 'Tools to manipulate MIME messages';
Subject: Re: [rt.cpan.org #77138] lack of module_name breaks its use in tools like Carton + patch
Date: Mon, 14 May 2012 09:42:42 -0400
To: bug-MIME-tools [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Hi, Thanks for your bug report and patch. I've applied the patch and the fixed version of Makefile.PL will be in the next release. Regards, David.
Thanks a lot for the quick reply, i am very pleasantly surprised! A question, so i know how to classify our internal ticket: Should i plan for the next release in a matter of days, weeks or months? :)
Subject: Re: [rt.cpan.org #77138] lack of module_name breaks its use in tools like Carton + patch
Date: Mon, 14 May 2012 11:16:53 -0400
To: bug-MIME-tools [...] rt.cpan.org
From: "David F. Skoll" <dfs [...] roaringpenguin.com>
Hi, Christian, Show quoted text
> A question, so i know how to classify our internal ticket: Should i > plan for the next release in a matter of days, weeks or months? :)
Umm... :) I would say weeks... I'm somewhat busy with other projects at the moment. Regards, David.
I'm in no hurry, so that's perfectly fine. Thanks again for the answer. :)
Hi, I have just uploaded MIME-tools-5.503 to CPAN, which I believe resolves this ticket. Regards, David.