Hi All
Just came across this previous message whilst debugging an issue:
John Barrett john
at jbrt.org
Thu Apr 16 10:25:03 BST 2015
On Wed, 15 Apr 2015 17:55:11 +0100
John Barrett <john at jbrt.org> wrote:
>
> get '/object' => sub {
> AnObject->new;
> };
>
Quick follow up on this,
Wrapping the instance in a hashref constructor performs as expected:
get '/object' => sub {
{ object => AnObject->new };
};
...which I guess is what I should have been doing in the first place.
Sorry for noise.
There was no confirmation of the final message. I have the exact same issue – the return of an object used to work fine – the code I have was tested 2 months ago with no issues. We have of course been updating modules and dancer, and coming
back to this project, the serialiser now gives the Route Exception error just like for John. I will test out his solution – can I get confirmation that this is indeed the way to properly handle it, or is this a bug?
|
Zahir Lalani |
|
|
|
2 Tabernacle Street, London,
EC2A 4LU m: +44 (0)7956 455168 t: +44 (0)203 142 3619 |