<div dir="ltr">I found out I had to be in the app directory to run the script. So you can make a sh file that cd's into the app dir to run it at least if you plan on using cron. It took me a long time to figure that out. I would be interested to see what others say.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 22, 2017 at 5: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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send dancer-users mailing list submissions to<br>
        <a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/<wbr>mailman/listinfo/dancer-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:dancer-users-request@dancer.pm">dancer-users-request@dancer.pm</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:dancer-users-owner@dancer.pm">dancer-users-owner@dancer.pm</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of dancer-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. Weird database plugin issue (Zahir Lalani)<br>
<br>
<br>
------------------------------<wbr>------------------------------<wbr>----------<br>
<br>
Message: 1<br>
Date: Fri, 22 Sep 2017 08:49:22 +0000<br>
From: Zahir Lalani <ZahirLalani@oliver.agency><br>
To: Perl Dancer users mailing list <<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a>><br>
Subject: [dancer-users] Weird database plugin issue<br>
Message-ID:<br>
        <<a href="mailto:AM5PR0602MB294877B0B653A8E23E7EE501A7670@AM5PR0602MB2948.eurprd06.prod.outlook.com">AM5PR0602MB294877B0B653A8E23E<wbr>7EE501A7670@AM5PR0602MB2948.<wbr>eurprd06.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Hi All<br>
<br>
Hoping someone can help<br>
<br>
We of course use dancer2 as a web app, but we also have some back end services that run as command line/service items. We include Dancer in those as we get a lot of the benefits. We recently started to use database calls in those backend tools but we are getting odd results. In some setups they work, in others we get this error:<br>
<br>
Use of uninitialized value in subroutine entry at /usr/local/share/perl5/<wbr>Dancer2/Plugin.pm line 532.<br>
Undefined subroutine &main:: called at /usr/local/share/perl5/<wbr>Dancer2/Plugin.pm line 532.<br>
<br>
I have setup a simple test that shows the failure:<br>
<br>
#!/usr/bin/perl<br>
<br>
use lib '/var/www/OMG/lib';<br>
use Dancer2 appname => 'OMG';<br>
use strict;<br>
use warnings;<br>
use Data::Dumper;<br>
use Dancer2::Plugin::Database;<br>
<br>
<br>
debug "begin \n";<br>
<br>
my $sth = database->prepare("select * from public.external_application_<wbr>token_get('')");<br>
<br>
debug "end \n";<br>
<br>
its related to the latest version of the plugin 2.17.  2.14 works. Any clues?<br>
<br>
Zahir Lalani<br>
Head of Development & Architecture<br>
<br>
[cid:96F784CA-E917-4CC1-A9A9-<wbr>96CBDA2AF2BC]<br>
<br>
151 Rosebery Avenue,<br>
London, EC1R 4AB<br>
<br>
m: +44 (0)7956 455168<br>
t: +44 (0)203 142 3619<br>
e: zahirlalani@oliver<mailto:<a href="mailto:zahirlalani@oliver-marketing.com">zahi<wbr>rlalani@oliver-marketing.com</a>>.<wbr>agency<br>
w: www.oliver.agency<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20170922/83ec9c5f/attachment-0001.html" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/<wbr>pipermail/dancer-users/<wbr>attachments/20170922/83ec9c5f/<wbr>attachment-0001.html</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image002.png<br>
Type: image/png<br>
Size: 2171 bytes<br>
Desc: image002.png<br>
URL: <<a href="http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20170922/83ec9c5f/attachment-0001.png" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/<wbr>pipermail/dancer-users/<wbr>attachments/20170922/83ec9c5f/<wbr>attachment-0001.png</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
______________________________<wbr>_________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" rel="noreferrer" target="_blank">http://lists.preshweb.co.uk/<wbr>mailman/listinfo/dancer-users</a><br>
<br>
<br>
------------------------------<br>
<br>
End of dancer-users Digest, Vol 91, Issue 3<br>
******************************<wbr>*************<br>
</blockquote></div><br></div>