Thanks, Florent for the quick reply. Honestly, I'm a bit confused, since
I haven't found anywhere in the documentation and current release
anything about 'is_strong' modifier. What would it do? Would it undef
the variable associated with the option in the case the option is not used?
What I need is to distinguish between not using an option and using
without the optional argument (e.g. --verbose writing to STDOUT if no
argument is used or writing to a file whose name is provided as
argument: definitely you want the program to shut up if you don't use
--verbose).
At the same time, it is necessary to respect the backward compatibility
(i.e. the option with optional argument set to the default value both
when it is not used or when it is used without arguments--useless
behavior, in my opinion), we need not to alter any behavior of the
existing fields. I have achieved that by introducing the 'no_val' field.
I thought that the meaning would be intuitive, and--definitely--the
implementation in the code is quite easy. As matter of fact am using it
successfully in our code and have never encountered any issue with any
other script using Getopt::Euclid.
Unfortunately, I do have a full-time job and am quite busy on the side
as well. I'm not interested in any way to become one of the developers
of this module. I thought that providing an implementation of the
possible solution in a way that could be easily "diffed" with the latest
development draft (I believe that I've introduced changes in maximum ten
lines of code) would be a good step forward compared to just whining
about a bug.
Since the solution to our problems has been already implemented
internally, I have serious doubt that my boss would authorize me
spending more efforts and resources for this module. If I have to do it
in my "free time", I'll probably could think messing with the Git
repository and working on some test, but it will take much longer.
Thanks!
Paolo
On Wed Aug 31 00:52:06 2011, FANGLY wrote:
Show quoted text> My proposal would makes it possible to display the default value in the
> POD as is already possible in recent versions of Getopt::Euclid.
>
> =item [-]-debug [<log_level>]
>
> Debug: optional log level. If no log level is specified, it is assumed
> to be [default: log_level.default]
>
> =for Euclid:
> log_level.type: string
> log_level.default: 'DEBUG'
> log_level.default.is_strong: 0