Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 61779
Status: resolved
Priority: 0/
Queue: ExtUtils-MakeMaker

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
avar [...] cpan.org
SREZIC [...] cpan.org
Cc: alexchorny [...] gmail.com
SREZIC [...] cpan.org
AdminCc:

Bug Information
Severity: Wishlist
Broken in:
  • 6.57_02
  • 6.57_03
  • 6.57_04
  • 6.57_05
Fixed in: 6.57_06



Subject: Multiple values for AUTHOR
The META.yml allows an array of author names, but ExtUtils::MakeMaker lets me specify only one name. However, the MakeMaker documentation states that "package author(s)" may be specified, but there's no indication if this should be a comma-separated string or an array reference (judging from the source, neither is supported). It would be nice if AUTHOR would allow an array reference, or, if this is too dangerous in terms of backward compatibility, maybe a new key AUTHORS should be added. Regards, Slaven
CC: Alexandr Ciornii <alexchorny [...] gmail.com>
Subject: "make AUTHOR also accept arrayref" broke MM->new({}) invocation
The recently added support for multiple AUTHORS via having AUTHOR accept an arrayref broke distros like Pod::Constant. The issue is that while WriteMakefile() will convert to the new-style invocation via _convert_compat_attrs, MM->new({}) does not use this conversion. So this breaks: use ExtUtils::MakeMaker; my $mm = MM->new({ NAME => 'Single::Author', AUTHOR => 'Single Author <single-author@example.net>', }); Like this: Can't use string ("Single Author <single-author@exa"...) as an ARRAY ref while "strict refs" in use at /home/avar/g/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm line 2887. You should munge things passed to the "new" constructor too, not just WriteMakefile. It would also be worthwhile to alter the test suite so that every test is run both with WriteMakefile() *and* ->new({}) to make sure similar bugs don't crop up.
On Wed Sep 29 17:38:38 2010, AVAR wrote: Show quoted text
> The recently added support for multiple AUTHORS via having AUTHOR > accept an arrayref broke distros like Pod::Constant. > > The issue is that while WriteMakefile() will convert to the new-style > invocation via _convert_compat_attrs, MM->new({}) does not use this > conversion.
From documentations of ExtUtils::MM (MM is an alias to it): "FOR INTERNAL USE ONLY". I will fix it, but no tests for details of internal implementation. -- Alexandr Ciornii, http://chorny.net
CC: Alexandr Ciornii <alexchorny [...] gmail.com>
Subject: Re: [rt.cpan.org #61779] "make AUTHOR also accept arrayref" broke MM->new({}) invocation
Date: Wed, 29 Sep 2010 15:50:00 -0700
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
On 2010.9.29 2:38 PM, AEvar Arnfjord Bjarmason via RT wrote: Show quoted text
> The recently added support for multiple AUTHORS via having AUTHOR > accept an arrayref broke distros like Pod::Constant. > > The issue is that while WriteMakefile() will convert to the new-style > invocation via _convert_compat_attrs, MM->new({}) does not use this > conversion. So this breaks: > > use ExtUtils::MakeMaker; > my $mm = MM->new({ > NAME => 'Single::Author', > AUTHOR => 'Single Author <single-author@example.net>', > }); > > Like this: > > Can't use string ("Single Author <single-author@exa"...) as an > ARRAY ref while "strict refs" in use at > /home/avar/g/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm line 2887. > > You should munge things passed to the "new" constructor too, not just > WriteMakefile. It would also be worthwhile to alter the test suite so > that every test is run both with WriteMakefile() *and* ->new({}) to > make sure similar bugs don't crop up.
Thanks for your report. Architecturally, the conversion should probably be in new(). chorny, I'm wondering if changing AUTHOR is the right thing to do. For starters, AUTHOR is singular. Rather than overloading AUTHOR how about leaving AUTHOR alone and adding AUTHORS? Then internally convert AUTHOR to AUTHORS. That avoids both compatibility and grammatical issues. PS MM->new() is undocumented. Nobody should not be relying on it. I see its not your module, I'll report the bug to them. Have you spotted more? -- Ahh email, my old friend. Do you know that revenge is a dish that is best served cold? And it is very cold on the Internet!
CC: SREZIC [...] cpan.org
Subject: Can't use string (...author...) as an ARRAY ref
Looks like a MakeMaker regression: Can't use string ("Naoki Tomita <tomita@cpan.org>") as an ARRAY ref while "strict refs" in use at /home/src/perl/repoperls/installed-perls/perl/v5.13.11-100-g167630b/lib/5.13.11/ExtUtils/MM_Unix.pm line 2894. Test cases arrived on RT from SREZIC: https://rt.cpan.org/Ticket/Display.html?id=66928 https://rt.cpan.org/Ticket/Display.html?id=66965 https://rt.cpan.org/Ticket/Display.html?id=66967 https://rt.cpan.org/Ticket/Display.html?id=66968
On Mon Mar 28 02:21:09 2011, ANDK wrote: Show quoted text
> Looks like a MakeMaker regression: > > Can't use string ("Naoki Tomita <tomita@cpan.org>") as an ARRAY ref > while "strict refs" in use at > /home/src/perl/repoperls/installed-perls/perl/v5.13.11-100- > g167630b/lib/5.13.11/ExtUtils/MM_Unix.pm > line 2894. > > Test cases arrived on RT from SREZIC: > > https://rt.cpan.org/Ticket/Display.html?id=66928 > https://rt.cpan.org/Ticket/Display.html?id=66965 > https://rt.cpan.org/Ticket/Display.html?id=66967 > https://rt.cpan.org/Ticket/Display.html?id=66968
These all use Module::Install and contain a copy of *just* ExtUtils/MakeMaker.pm in inc with none of the other modules (ExtUtils::MM_Unix for example) so they'll get out of sync. Surprising they work at all. Conclusion: Broken distributions. We just revealed them by changing something in the guts of MakeMaker. Please report them to the author.