[dancer-users] JSON serializer, returning object instances form route handlers, convert_blessed

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.


More information about the dancer-users mailing list