Skip Menu |

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

Report information
The Basics
Id: 133216
Status: patched
Priority: 0/
Queue: Getopt-Long

People
Owner: jv [...] cpan.org
Requestors: dima [...] secretsauce.net
Cc:
AdminCc:

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



Subject: GetOptions() does not accept values like "5." as valid floating point
Date: Sat, 22 Aug 2020 05:37:36 -0700
To: bug-Getopt-Long [...] rt.cpan.org
From: Dima Kogan <dima [...] secretsauce.net>
Hi. Here's a demo program: use Getopt::Long; my %opt; @ARGV=("cmd", "--opt", "5."); GetOptions(\%opt, 'opt=f'); I'm telling the option parser to expect a --opt option with a floating-point argument. This generally works. But when I give it "5." as the argument string, it barfs: Value "5." invalid for option opt (real number expected) This is simply wrong. Strings like that are valid floats in perl and everywhere else that I've seen. Thanks.
Wow... Just before Getopt::Long's 30th birthday someone notices this :).
Subject: Re: [rt.cpan.org #133216] GetOptions() does not accept values like "5." as valid floating point
Date: Sat, 22 Aug 2020 12:43:01 -0700
To: bug-Getopt-Long [...] rt.cpan.org
From: Dima Kogan <dima [...] secretsauce.net>
May the next 30 years be slightly less buggy :) Thanks for patching.