From: | gregoa [...] cpan.org |
Subject: | libgetopt-euclid-perl: 0.2.9 does not recognise options in a =head2 inside =head1 OPTIONS |
This bug has been forwarded from http://bugs.debian.org/641430
Summary:
The change mentioned as
" - Required and optional arguments can now be put in a POD head section =head2,
=head3 and =head4 for more flexibility"
in Changes (or s/=head1/$HEAD_START/ in the code) breaks code where there
are subheadlines between e.g. "=head1 OPTIONS" and =over.
I guess that was not the aim of this change :)
Maybe being a bit more generous in the loops would be possible?
Show quoted text
>>> original bug report <<<
Package: libgetopt-euclid-perl
Version: 0.2.9-1
Severity: grave
Justification: unpredictable effects on previously-working software
mpd-dynamic, a script provided by libaudio-mpd-perl, uses Getopt::Euclid for
command-line options. G::E 0.2.7 recognises that it has command-line options,
but G::E 0.2.9 does not. An easy test case (which does not require you to
have mpd) is to run "mpd-dynamic --help" and see whether, for instance,
the "-sleep" option is listed.
In the case of mpd-dynamic, this is rather nasty, since it relies on
G::E to give it sensible defaults: for instance, it would normally sleep for
a few seconds between "main loop" iterations, but in the absence of a default
for $ARGV{sleep}, it busy-loops on an attempt to connect to an mpd server,
and the system quickly runs out of ports that are not in TIME_WAIT state.
The cause seems to be a couple of =head2 headings inside the OPTIONS =head1:
=head1 OPTIONS
=head2 General behaviour
You can customize the usage of mpd-dynamic with the following options:
=over 4
=item -o[ld] <old>
Deleting the lines "=head2 General behaviour" and "=head2 Ratings" from
the mpd-dynamic script works around this. I think Getopt::Euclid should
really ignore those sub-headings, though.
Regards,
S
Show quoted text>>> original bug report <<<
Thanks in advance,
gregor herrmann, Debian Perl Group