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.

On Fri, Sep 22, 2017 at 5:00 AM, <[email protected]> wrote:

> Send dancer-users mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dancer-users digest..."
>
>
> Today's Topics:
>
>    1. Weird database plugin issue (Zahir Lalani)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 22 Sep 2017 08:49:22 +0000
> From: Zahir Lalani <[email protected]>
> To: Perl Dancer users mailing list <[email protected]>
> Subject: [dancer-users] Weird database plugin issue
> Message-ID:
>         <AM5PR0602MB294877B0B653A8E23E7EE501A7670@AM5PR0602MB2948.
> eurprd06.prod.outlook.com>
>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi All
>
> Hoping someone can help
>
> 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:
>
> Use of uninitialized value in subroutine entry at 
> /usr/local/share/perl5/Dancer2/Plugin.pm
> line 532.
> Undefined subroutine &main:: called at 
> /usr/local/share/perl5/Dancer2/Plugin.pm
> line 532.
>
> I have setup a simple test that shows the failure:
>
> #!/usr/bin/perl
>
> use lib '/var/www/OMG/lib';
> use Dancer2 appname => 'OMG';
> use strict;
> use warnings;
> use Data::Dumper;
> use Dancer2::Plugin::Database;
>
>
> debug "begin \n";
>
> my $sth = database->prepare("select * from public.external_application_
> token_get('')");
>
> debug "end \n";
>
> its related to the latest version of the plugin 2.17.  2.14 works. Any
> clues?
>
> Zahir Lalani
> Head of Development & Architecture
>
> [cid:96F784CA-E917-4CC1-A9A9-96CBDA2AF2BC]
>
> 151 Rosebery Avenue,
> London, EC1R 4AB
>
> m: +44 (0)7956 455168
> t: +44 (0)203 142 3619
> e: zahirlalani@oliver<mailto:[email protected]>.agency
> w: www.oliver.agency
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/
> attachments/20170922/83ec9c5f/attachment-0001.html>
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image002.png
> Type: image/png
> Size: 2171 bytes
> Desc: image002.png
> URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/
> attachments/20170922/83ec9c5f/attachment-0001.png>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> dancer-users mailing list
> [email protected]
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
> ------------------------------
>
> End of dancer-users Digest, Vol 91, Issue 3
> *******************************************
>
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to