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