in reply to How can I configure the perl App::Cmd module to complain about incorrect options
If you pass an unrecognised option, App::Cmd doesn't complain, but it also doesn't ignore it! It adds it to the $args array.
If you don't like this, the easiest thing is to create a subclass of App::Cmd::Command, and override validate_args to check for arguments that look like they were intended to be options. Then use your subclass instead of using App::Cmd::Command directly.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How can I configure the perl App::Cmd module to complain about incorrect options
by ascobie (Initiate) on Jun 18, 2013 at 08:50 UTC |