Subject: | Undeclared @arg variable |
Date: | Thu, 22 Sep 2011 13:44:57 -0400 |
To: | <bug-Getopt-Euclid [...] rt.cpan.org> |
From: | Bill Levering <blevering [...] ctgusa.com> |
My script has:
Show quoted text
And, yes, both items have the line ³repeatable² in their =for Euclid:
sections.
Could all arguments be declared, whether or not their values are defined, or
their arrays or hashes are empty? Twould be so nice.
Thank you,
Bill Levering
> use Getopt::Euclid qw(:vars<arg_>);
>
I am using version 0.3.0. I also had the problem with 0.2.7.
For optional arguments that are repeatable, I have two examples:
1. For =item --final-phase <name>, @arg_final_phase is declared, and is
empty, when it is NOT present on the command line. Here we have an example
of an empty list of scalar values.
2. For =item --final-keyword <keyword>:<value>, @arg_final_keyword is NOT
declared, yet it should be an empty list of hash references. To test for its
presence, I cannot simply say
Show quoted text>> if (@arg_final_keyword)
> I have to say
>> if (exists($main::{arg_final_keyword}))
> Seems odd.
>