[dancer-users] dancer-users Digest, Vol 67, Issue 19

Rick Leir richard.leir at canadiana.ca
Mon Sep 21 16:28:23 BST 2015


On Mon, Sep 21, 2015 at 7:00 AM, <dancer-users-request at dancer.pm> wrote:

>
> >     get '/' => sub {
> >         if ( -d service("capdir") ) {
> >             return {message => 'Hello World'};
> >         }
> >         else {
> >             return ({message => service});
> >         }
>
> There are two calls to `service` in your route code. The second one
> (within the else block) has no name argument.
>
> Hope that helps,
>    Russell.
>
> Thanks Russell.
Oops. Of course, that explains the exception and its message.

I was trying to debug a problem where service("capdir") returns undefined.
My .t file is in the archives here:

http://lists.preshweb.co.uk/pipermail/dancer-users/2015-September/005015.html

What is a good way to debug this? I copy core Dancer2 modules to my local
lib, then drop Data::Printer calls into them. There (hopefully) would be a
better way. Maybe # perl -d


-- 
Rick Leir
Developer, Canadiana.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150921/6d359c49/attachment.html>


More information about the dancer-users mailing list