[dancer-users] Weird database plugin issue

Zahir Lalani ZahirLalani at oliver.agency
Fri Sep 22 09:49:22 BST 2017


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 at oliver<mailto:zahirlalani at oliver-marketing.com>.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.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.png>


More information about the dancer-users mailing list