Skip Menu |

This queue is for tickets about the Getopt-Euclid CPAN distribution.

Report information
The Basics
Id: 70942
Status: resolved
Priority: 0/
Queue: Getopt-Euclid

People
Owner: Nobody in particular
Requestors:
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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
Hi Greg, Thanks for the report. In 0.2.9, you indeed cannot put subheadings insite the OPTIONAL or REQUIRED ARGUMENTS section. I did not realize that people where doing this and all the tests passed for the new functionality, so I did not expect existing programs to break. It seems like I pushed the existing POD parsing capabilities of Getopt::Euclid beyond its limits and I don't see any easy fix for the problem you are reporting other than reverting this functionality for the time being. I opened a new TODO ticket to re-implement this feature in the future and implement 'decorations': RT #70948 Florent
Greg, I removed the problematic feature from the new version, 0.3.0. Try it and let me know if something is wrong. Cheers, Florent
On Tue Sep 13 21:57:41 2011, FANGLY wrote: Show quoted text
> Greg, I removed the problematic feature from the new version, 0.3.0. Try > it and let me know if something is wrong. Cheers, > Florent
This looks very good, thanks alot for releasing a fix so quickly! I'll let you know in the unlikely case I or the original bug submitter detect any issues. Cheers, gregor