Skip Menu |

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

Report information
The Basics
Id: 51622
Status: open
Priority: 0/
Queue: Getopt-ArgvFile

People
Owner: Nobody in particular
Requestors: nodine [...] cpan.org
Cc:
AdminCc:

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



Subject: Need to specify comment syntax
Various Verilog-parsing programs allow putting the sometimes very lengthy option lists into files. Unfortunately, these parsers use "//" to indicate a comment rather than "#". I would like to have an additional switch available called "comment" which gives a regular expression for the start-of-comment character(s). I have already implemented this functionality and have supplied a patch file.
Subject: patch.txt
*** orig/Getopt/ArgvFile.pm 2007-04-21 13:26:47.000000000 -0500 --- Getopt/ArgvFile.pm 2009-11-17 14:33:10.000000000 -0600 *************** *** 335,341 **** script. They can be stored exactly as they would be written in the command line, but may be spread to multiple lines. To make the ! file more readable, space and comment lines (starting with a "#") ! are allowed additionally. POD comments are supported as well. ! For example, the call > script -optA argA -optB -optC cArg par1 par2 --- 335,342 ---- script. They can be stored exactly as they would be written in the command line, but may be spread to multiple lines. To make the ! file more readable, space and comment lines (starting with a "#" or ! whatever string is specified in the C<option> switch) are allowed ! additionally. POD comments are supported as well. For example, the ! call > script -optA argA -optB -optC cArg par1 par2 *************** *** 626,629 **** --- 627,632 ---- my %switches=@_; + $switches{comment} ||= '#'; + # perform more parameter checks confess('[BUG] The "array" parameter value is no array reference.') if exists $switches{array} and not (ref($switches{array}) and ref($switches{array}) eq 'ARRAY'); *************** *** 776,780 **** # skip space and comment lines (including POD) ! next if /^\s*$/ || /^\s*\#/ || $pod; # remove newlines, leading and trailing spaces --- 779,783 ---- # skip space and comment lines (including POD) ! next if /^\s*$/ || /^\s*(?:$switches{comment})/ || $pod; # remove newlines, leading and trailing spaces
I have elevated this issue to critical since I absolutely need this functionality and there is no work-around within the release 1.11. I've attached a .tar.gz file that could be used to do the actual release with the improvement. Alternatively, you could add me as a maintainer and I'll be glad to upload the file directly to PAUSE.
Subject: Getopt-ArgvFile-1.12.tar.gz
Download Getopt-ArgvFile-1.12.tar.gz
application/x-gzip 19.5k

Message body not shown because it is not plain text.

Mark, I am sorry it took that time to respond. This was due to private changes but I will try to look at your patch within the next days. Thank you for your suggestion and the provided patch. Regards Jochen
Subject: Re: [rt.cpan.org #51622] Need to specify comment syntax
Date: Mon, 24 May 2010 10:46:31 -0500
To: bug-Getopt-ArgvFile [...] rt.cpan.org
From: Mark Nodine <mnodine [...] apple.com>
JSTENZEL via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=51622 > > > Mark, > > I am sorry it took that time to respond. This was due to private changes but > I will try to look at your patch within the next days.
Thanks! --Mark