Bug#547998: libgetopt-euclid-perl: Do not recognise options after repeated placeholders
Daniel Dehennin
daniel.dehennin at baby-gnu.org
Wed Sep 23 15:07:22 UTC 2009
Le 5866 Septembre 1993, Niko Tyni a envoyé:
> The "only" part isn't in the documentation :)
>
> Any placeholder that is immediately followed by "..." [example snipped]
> will match as many times as possible, but at least once. Note that
> this implies that an unconstrained repeated unflagged placeholder (see
> "Placeholder constraints" and "Unflagged placeholders") will consume
> the rest of the command-line, and so should be specified last in the
> POD.
Yes, the only is not in the documentation but it sound like it to me. If
there is no unflagged placeholder no one should consume the reste of the
command-line.
> The only constraint you're providing is 'group.type: string', which is
> the default type anyway, so this is effectively unconstrained. After all,
> '--hosts' is a string too.
Yes, unconstrained but not unflagged.
> It seems to me this is the intended behaviour rather than a bug, but
> please let me know what you think.
I thought that Getopt::Euclid excluded the declared options from
placeholders.
My new test case:
--8<---------------cut here---------------start------------->8---
./test.pl --groups --hosts myhost
Unknown argument: myhost
(Try: test.pl --help)
--8<---------------cut here---------------end--------------->8---
The correct error here is the missing <group>.
Regards.
--
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.pl
Type: text/x-perl
Size: 403 bytes
Desc: test case2
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090923/869aab3b/attachment.pl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20090923/869aab3b/attachment.pgp>
More information about the pkg-perl-maintainers
mailing list