Skip Menu |

This queue is for tickets about the Getopt-Long-Complete CPAN distribution.

Report information
The Basics
Id: 110991
Status: resolved
Priority: 0/
Queue: Getopt-Long-Complete

People
Owner: Nobody in particular
Requestors: jtbraun [...] CPAN.org
Cc:
AdminCc:

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



Subject: The catch-all option spec '<>' isn't recognized by Getopt::Long::Complete
Run in bash: complete -C ./test-complete.pl ./test-complete.pl chmod +x ./test-complete.pl Now type: ./test-complete.pl -<tab> You're given --clean and --purge as options Now: export SHOWBUG=1 ./test-complete.pl -<tab> The script dies with: Can't parse option spec '<>' at ~/perl5/CPAN/lib/perl5/Complete/Getopt/Long.pm line 300. Separate, just doing: unset SHOWBUG ./test-complete.pl <tab> Results in a die with: Can't use an undefined value as a subroutine reference at ~/perl5/CPAN/lib/perl5/Complete/Getopt/Long.pm line 559.
Subject: test-complete.pl
#!/usr/bin/env perl use Getopt::Long::Complete; my $clean = 0; my $purge = 0; my @other; my @OPTIONS = ( "clean" => \$clean, "purge" => \$purge ); if ($ENV{SHOWBUG}) { push @OPTIONS, '<>' => sub { push @other, $_ }; } GetOptions( @OPTIONS ) or die "bad options";
I've added support for parsing '<>' in Getopt::Long::Util 0.84. Try with the new release and report back if there is still an error.
On Fri, 8 Jan 2016 07:25:14 GMT, PERLANCAR wrote: Show quoted text
> I've added support for parsing '<>' in Getopt::Long::Util 0.84. Try > with the new release and report back if there is still an error.
Closing ticket now.