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!