Skip to Content.
Sympa Menu

devel - Getopt question

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: address@concealed (J�r�me Marant)
  • To: address@concealed
  • Subject: Getopt question
  • Date: 10 Apr 2001 17:45:31 +0200


Hi,

The code for getting options from the command line is:

&GetOptions(\%main::options, 'dump|s:s', 'debug|d', 'foreground',
'config|f=s', 'lang|l=s', 'mail|m', 'keepcopy|k=s');

I'm wondering is the Getopt configuration for 'dump' is right since
the Getopt::Long manpage tells :

: type [ desttype ]
Like `=', but designates the argument as optional. If
omitted, an empty string will be assigned to string
values options, and the value zero to numeric options.

Note that if a string argument starts with `-' or
`--', it will be considered an option on itself.

However, parameters to dump are mandatory, so 's=s' might replace
's:s', am I wrong?

--
Jérôme Marant <address@concealed>

http://IDEALX.org



Archive powered by MHonArc 2.6.19+.

Top of Page