Starting with 0.319, this App::Cmd::Simple app:
use strict;
use warnings;
package MyApp;
use base qw(App::Cmd::Simple);
sub validate_args {
my ($self, $opt, $args) = @_;
# no args allowed but options!
$self->usage_error("No args allowed") if @$args;
}
sub execute {
my ($self, $opt, $args) = @_;
print "run.";
}
1;
triggers the "No args allowed" usage error, because $args is:
\ [
[0] undef
]
instead of the empty array it used to be.
Haven't had a chance to track down what change is responsible; did confirm it works in 0.318
and is broken in 0.319 and 0.320.