Might confuse some (specifically me)

Eric Wilhelm scratchcomputing at gmail.com
Tue Sep 4 20:05:29 BST 2007


# from Andy Armstrong
# on Tuesday 04 September 2007 11:34 am:

>On 4 Sep 2007, at 19:27, Andy Armstrong wrote:
>> @ARGV = map { s/^-(man|help)$/--$1/; $_ } @ARGV;
>>
>> by translating -man -> --man and -help -> --help. It's ugly but I'm
>> tempted to leave it like that so that people's first experience with
>> prove isn't a scary looking error message.
>
>Or even
>
>if ( my @bad = map {"-$_"} grep {/^-(man|help)$/} @ARGV ) {
>     die "Long options should be written with two dashes: ",
>       join( ', ', @bad ), "\n";
>}
>
>so that we tell people explicitly what they must do. I'm going to
>commit that. Tell me if it's stupid for some reason.

Well, it is stupid to have to do this kind of workaround.  See also:  
r395 -- Getopt::Long refuses to die during a callback.

Perhaps we should look at using Getopt::Crazy[1] iff it is available 
(and setting it as recommended in Build.PL.)  Then anyone not running 
an ancient perl would have predictable and extensible option 
processing.

[1]  http://scratchcomputing.com/svn/Getopt-Crazy/trunk is not on CPAN, 
but I can fix that.

--Eric
-- 
[...proprietary software is better than gpl because...] "There is value
in having somebody you can write checks to, and they fix bugs."
--Mike McNamara (president of a commercial software company)
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------


More information about the tapx-dev mailing list