Hello all,
I'm using Getopt::Euclid to create a command line parser up to this spec:
Usage:
dbsetup.pl <dbfile> [options]
Required arguments:
<dbfile>
Database file name. Existing files will not be overwritten unless the
force parameter is specified.
Options:
-f | --force
Force overwrite of existing database file.
-m <X> | --mockup=<X>
Insert mock-up data set X into the database.
The funny behavior I get is that './dbsetup -d', which has an invalid flag, will happily assume '-d' is the filename; is there a way to make it more gnu-getopt like? Ie. -d bails out with 'invalid flag' unless one specifically runs './dbsetup -- -d'?
Even more funny is that './dbsetup -m' will not die of something like '-m should be followed by a parameter and is not AND you didnt specify a filename', but also assume '-m' is the file name! Isn't this erroneous?
Thanks, Michal
In reply to Getopt::Euclid, strange behavior & how to fix? by pht
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |