I don't understand this email. T abundance of HTML in your message is quite disruptive. You either did not include the actual error or the HTML is in the way. I'm not even sure what I'm reading, but it seems like you copy pasted your inbox and a message you received and a comment to that message. I'm not sure. Also, other than not including the error, you didn't really provide any context to this. What is this about? What would help is "this is my code and here is an error I received". Both are not present. :) Can you please fill in the blanks? On Fri, Jul 10, 2015 at 12:39 PM, Zahir Lalani <ZahirLalani@oliver.agency> wrote:
Hi All
Just came across this previous message whilst debugging an issue:
*John Barrett* john at jbrt.org <dancer-users%40dancer.pm?Subject=Re%3A%20%5Bdancer-users%5D%20JSON%20serializer%2C%0A%20returning%20object%20instances%20form%20route%20handlers%2C%20convert_blessed&In-Reply-To=%3C20150416102503.3b16541b%40rimmer.home.fuzzix.org%3E> *Thu Apr 16 10:25:03 BST 2015*
- Previous message: [dancer-users] JSON serializer, returning object instances form route handlers, convert_blessed <http://lists.preshweb.co.uk/pipermail/dancer-users/2015-April/004499.html> - Next message: [dancer-users] Dancer training at YAPC::NA <http://lists.preshweb.co.uk/pipermail/dancer-users/2015-April/004506.html> - *Messages sorted by:* [ date ] <http://lists.preshweb.co.uk/pipermail/dancer-users/2015-April/date.html#4505> [ thread ] <http://lists.preshweb.co.uk/pipermail/dancer-users/2015-April/thread.html#4505> [ subject ] <http://lists.preshweb.co.uk/pipermail/dancer-users/2015-April/subject.html#4505> [ author ] <http://lists.preshweb.co.uk/pipermail/dancer-users/2015-April/author.html#4505>
------------------------------
On Wed, 15 Apr 2015 17:55:11 +0100
John Barrett <john at jbrt.org <http://lists.preshweb.co.uk/mailman/listinfo/dancer-users>> 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 Head of Development & Architecture*
[image: cid:96F784CA-E917-4CC1-A9A9-96CBDA2AF2BC]
2 Tabernacle Street,
London, EC2A 4LU
m: +44 (0)7956 455168
t: +44 (0)203 142 3619
e: *zahirlalani@oliver-marketing.com <zahirlalani@oliver-marketing.com>*
w: www.oliver-marketing.com
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users