fix handling of slurpy arguments in tuples
authorGraham Knop <haarg@haarg.org>
Thu, 21 Jul 2022 08:35:13 +0000 (10:35 +0200)
committerGraham Knop <haarg@haarg.org>
Thu, 21 Jul 2022 08:35:13 +0000 (10:35 +0200)
commitc2af9db8c99907232e9572dd7de772dce53f03d5
treee7a93a754c1bd6cc9c951fcbe48d2be72c79934f
parent087c537d53c9598aef6aeb660d359c6b3d17bc15
fix handling of slurpy arguments in tuples

Type::Tiny version 1.016002 changed how slurpy types are represented.
Catalyst had been looking at the original parameters to a Tuple type,
and expecting a slurpy type to be a hashref as the last parameter. That
is no longer true, so the argument count checking would fail.

For new Type::Tiny versions, we can check that the final parameter is a
Slurpy type. This seems slightly more robust.
lib/Catalyst/Action.pm