<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 7:00 AM,  <span dir="ltr"><<a href="mailto:dancer-users-request@dancer.pm" target="_blank">dancer-users-request@dancer.pm</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
>     get '/' => sub {<br>
>         if ( -d service("capdir") ) {<br>
>             return {message => 'Hello World'};<br>
>         }<br>
>         else {<br>
>             return ({message => service});<br>
>         }<br>
<br>
There are two calls to `service` in your route code. The second one<br>
(within the else block) has no name argument.<br>
<br>
Hope that helps,<br>
   Russell.<br>
<br>
</blockquote></div>Thanks Russell.<br>Oops. Of course, that explains the exception and its message.  <br><br></div><div class="gmail_extra">I was trying to debug a problem where  service("capdir") returns undefined.  My .t file is in the archives here:<br>  <a href="http://lists.preshweb.co.uk/pipermail/dancer-users/2015-September/005015.html" target="_blank">http://lists.preshweb.co.uk/pipermail/dancer-users/2015-September/005015.html</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">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 </div><div class="gmail_extra"><br clear="all"><br>-- <br><div><div dir="ltr">Rick Leir<br>Developer, Canadiana.ca<br></div></div>
</div></div>