LittleJack has asked for the wisdom of the Perl Monks concerning the following question:
I don't have a ton of experience with Moose. Say I've got a sub/method called 'foo'. Up at the top of the relevant module is this:
validate_subs ( foo => { params => { user => [Object, 1], bar=> [Str, 1], baz=> [Str, 1], } },
and when that sub/method runs, I get this error:
encountered object 'Reference {"key" => "value","otherkey" => "otherva +lue","email...} did not pass type constraint "Object" (in $_{"user"})
At the point where the sub/method is supposed to return some data.
So what are my next steps? That looks to me like a logical perl object, except for the bare string 'Reference' at the start.
Any ideas gratefully received.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose throwing error with some data which doesn't match the 'Object' constraint, what should I do?
by choroba (Cardinal) on Jan 18, 2022 at 17:34 UTC | |
by LittleJack (Beadle) on Jan 18, 2022 at 21:38 UTC | |
|
Re: Moose throwing error with some data which doesn't match the 'Object' constraint, what should I do?
by Anonymous Monk on Jan 18, 2022 at 07:08 UTC | |
|
Re: Moose throwing error with some data which doesn't match the 'Object' constraint, what should I do?
by Anonymous Monk on Jan 18, 2022 at 08:49 UTC |