my $warranty_dates = $self->every_param('warranty_date');
my $state_ids = $self->every_param('state_id');
结果:
$VAR1 = undef;
和
$VAR1 = '12/12/2017';
$VAR2 = '12/12/2017';
$VAR3 = '12/12/2017';
$VAR4 = '12/12/2017';
$VAR5 = '12/12/2017';
分别在调用时
die Dumper(@{$state_ids});
die Dumper(@{$warranty_dates});
尽管显示具有以下参数:
"state_id" => [
1,
1,
1,
1,
1
],
"warranty_date" => [
"12/12/2017",
"12/12/2017",
"12/12/2017",
"12/12/2017",
"12/12/2017"
答案 0 :(得分:0)
所以我找到了答案,即我没有将这些参数作为发布请求来解决。
https://corky.net/dotan/programming/mojolicious-request-parameters-example.html
快速解释为什么其中一些参数需要采用格式
$self->req->every_param('');
Passing arguments to redirect_to in mojolicious and using them in the target controller