On Mon, Sep 21, 2015 at 7:00 AM, <[email protected]> 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
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to