Skip Menu |

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

Report information
The Basics
Id: 49525
Status: resolved
Priority: 0/
Queue: Getopt-Euclid

People
Owner: kgalinsky [...] gmail.com
Requestors: kgalinsky [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.2.1
  • v0.2.0
Fixed in:
  • 0.2.1
  • v0.2.0



Subject: Quoted arguments can get parsed as options
Because Getopt::Euclid combines @ARGV into a string and performs regex matches to get the results, it treats quoted strings with spaces in them the same as separate entries in @ARGV (i.e. `perl some_script.pl -foo bar;` is the same as `perl some_script.pl "-foo bar";`). I will fix this after I finish getting the POD parsed in a more easily understood manner.
Subject: quote_test.pl
#!/usr/bin/env perl use strict; use warnings; BEGIN { @ARGV = ( qw( -a 1 ), '-b 2' ) } use Getopt::Euclid; use Data::Dumper; print Dumper \%ARGV; =head1 REQUIRED ARGUMENTS =over =item -a <a> =back =head1 OPTIONS =over =item -b <b> =back =cut
Thanks for the report Kevin. I fixed this bug in the development repository and added new tests. Florent