Skip Menu |

This queue is for tickets about the Module-Build-Tiny CPAN distribution.

Report information
The Basics
Id: 100335
Status: resolved
Priority: 0/
Queue: Module-Build-Tiny

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

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



Subject: Can't use an undefined value as an ARRAY reference
I received this test report today: http://www.cpantesters.org/cpan/report/56ed08e6-6ab8-11e4-9ce3-9a752656b80b The relevant bit: Can't use an undefined value as an ARRAY reference at /home/njh/perl5/perlbrew/perls/perl-5.16.3/lib/site_perl/5.16.3/Getopt/Long.pm line 493.
On Fri Nov 14 12:31:16 2014, ETHER wrote: Show quoted text
> I received this test report today: > > http://www.cpantesters.org/cpan/report/56ed08e6-6ab8-11e4-9ce3- > 9a752656b80b > > The relevant bit: > > Can't use an undefined value as an ARRAY reference at > /home/njh/perl5/perlbrew/perls/perl- > 5.16.3/lib/site_perl/5.16.3/Getopt/Long.pm line 493.
Insufficient data to even start looking for the cause of this problem. Most likely the user program calls GetOptionsFromArray without arguments.
RT-Send-CC: LEONT [...] cpan.org
On 2014-11-14 11:12:38, JV wrote: Show quoted text
> On Fri Nov 14 12:31:16 2014, ETHER wrote:
> > I received this test report today: > > > > http://www.cpantesters.org/cpan/report/56ed08e6-6ab8-11e4-9ce3- > > 9a752656b80b > > > > The relevant bit: > > > > Can't use an undefined value as an ARRAY reference at > > /home/njh/perl5/perlbrew/perls/perl- > > 5.16.3/lib/site_perl/5.16.3/Getopt/Long.pm line 493.
> > Insufficient data to even start looking for the cause of this problem. > Most likely the user program calls GetOptionsFromArray without arguments. >
Does this help -- the error occured in Build, which was created by Module::Build::Tiny 0.039: https://metacpan.org/source/LEONT/Module-Build-Tiny-0.039/lib/Module/Build/Tiny.pm#L136 Would it not be reasonable for Getopt::Long to check that $argv is defined before trying to deference it as a list? cc leont, author of Module::Build::Tiny
Subject: Re: [rt.cpan.org #100335] Can't use an undefined value as an ARRAY reference
Date: Fri, 14 Nov 2014 22:06:57 +0100
To: bug-Getopt-Long [...] rt.cpan.org
From: Johan Vromans <jvromans [...] squirrel.nl>
On Fri, 14 Nov 2014 14:50:48 -0500 "Karen Etheridge via RT" <bug-Getopt-Long@rt.cpan.org> wrote: Show quoted text
> Does this help -- the error occured in Build, which was created by > Module::Build::Tiny 0.039: > > https://metacpan.org/source/LEONT/Module-Build-Tiny-0.039/lib/Module/Build/Tiny.pm#L136
Apparently, this runs into a situation where it calls GetOptionsFromArray with erroneous arguments. Show quoted text
> Would it not be reasonable for Getopt::Long to check that $argv is > defined before trying to deference it as a list?
Definitely. But calling die() will still blow up the call in Build::Tiny. It is more important that Build::Tiny checks the arguments before calling GetOptionsFromArray. I'll add an error message for this on the low-priority todo list. -- Johan
RT-Send-CC: jvromans [...] squirrel.nl, LEONT [...] cpan.org
On 2014-11-14 13:07:11, jvromans@squirrel.nl wrote: Show quoted text
> On Fri, 14 Nov 2014 14:50:48 -0500 > "Karen Etheridge via RT" <bug-Getopt-Long@rt.cpan.org> wrote: >
> > Does this help -- the error occured in Build, which was created by > > Module::Build::Tiny 0.039: > > > > https://metacpan.org/source/LEONT/Module-Build-Tiny- > > 0.039/lib/Module/Build/Tiny.pm#L136
> > Apparently, this runs into a situation where it calls > GetOptionsFromArray with erroneous arguments. >
> > Would it not be reasonable for Getopt::Long to check that $argv is > > defined before trying to deference it as a list?
> > Definitely. But calling die() will still blow up the call in > Build::Tiny. It is more important that Build::Tiny checks the > arguments > before calling GetOptionsFromArray. > > I'll add an error message for this on the low-priority todo list. > > -- Johan
Ok! I'm reopening this into the Module-Build-Tiny queue.
On Fri Nov 14 14:12:38 2014, JV wrote: Show quoted text
> On Fri Nov 14 12:31:16 2014, ETHER wrote:
> > I received this test report today: > > > > http://www.cpantesters.org/cpan/report/56ed08e6-6ab8-11e4-9ce3- > > 9a752656b80b > > > > The relevant bit: > > > > Can't use an undefined value as an ARRAY reference at > > /home/njh/perl5/perlbrew/perls/perl- > > 5.16.3/lib/site_perl/5.16.3/Getopt/Long.pm line 493.
> > Insufficient data to even start looking for the cause of this problem. > Most likely the user program calls GetOptionsFromArray without arguments. >
Yeah, I see no reason to assume Getopt::Long is to blame. I suspect it's a botched JSON.pm, because I am checking opening the file. Either way, it sounds to me like a freak accident, and unless it repeats itself I'd just ignore it. Leon
Subject: Re: [rt.cpan.org #100335] Can't use an undefined value as an ARRAY reference
Date: Fri, 14 Nov 2014 14:24:24 -0800
To: Leon Timmermans via RT <bug-Module-Build-Tiny [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Fri, Nov 14, 2014 at 05:11:09PM -0500, Leon Timmermans via RT wrote: Show quoted text
> Yeah, I see no reason to assume Getopt::Long is to blame. I suspect it's a botched JSON.pm, because I am checking opening the file. Either way, it sounds to me like a freak accident, and unless it repeats itself I'd just ignore it.
What happens if the file is empty?
On Fri Nov 14 17:11:09 2014, LEONT wrote: Show quoted text
> Yeah, I see no reason to assume Getopt::Long is to blame. I suspect > it's a botched JSON.pm, because I am checking opening the file. Either > way, it sounds to me like a freak accident, and unless it repeats > itself I'd just ignore it.
Closing this as "moon and stars didn't align right", until there's evidence otherwise.
On 2015-07-09 10:51:05, LEONT wrote: Show quoted text
> On Fri Nov 14 17:11:09 2014, LEONT wrote:
> > Yeah, I see no reason to assume Getopt::Long is to blame. I suspect > > it's a botched JSON.pm, because I am checking opening the file. > > Either > > way, it sounds to me like a freak accident, and unless it repeats > > itself I'd just ignore it.
> > Closing this as "moon and stars didn't align right", until there's > evidence otherwise.
This is now thought to be the same as this issue: https://rt.cpan.org/Ticket/Display.html?id=105931 i.e. _build_params was generated with an older MBT than what parses it, because something else upgraded MBT (via configure-requires) in the interim.