Subject: | Random order of parameters in "Mandatory parameters missing" message |
When I get this message:
Mandatory parameters 'x', 'y', 'z' missing in call to Foo::bar
The order of 'x', 'y', 'z' changes each time I run the code. It would be nice if it was sorted so it could be more easily checked in tests.
Using perl 5.22.2, an example:
use Params::Validate qw(:all);
my @in = ();
my %params = validate( @in, {
x => { type => SCALAR },
y => { type => SCALAR },
z => { type => SCALAR },
});
Output on different runs:
Mandatory parameters 'y', 'x', 'z' missing in call to (unknown)
at ./test.pl line 3.
Mandatory parameters 'z', 'x', 'y' missing in call to (unknown)
at ./test.pl line 3.
Mandatory parameters 'x', 'y', 'z' missing in call to (unknown)
at ./test.pl line 3.