[dancer-users] no request method

Jean-Marc Choulet jm130794 at gmail.com
Sun Nov 2 15:04:11 GMT 2014


Hello,

Is it possible to create a no request method in Dancer2 module ?

get qr{/(\d+)/members} => sub {
     my ($department) = splat;
     ...
     my $sth = database('foo')->prepare($queryString);
     ...
    # call my method doit();
     my $data = doit()...
}

sub doit {
     # I want to retrieve some data from my database 'foo'

     return $data
}

Thanks,

Jean-Marc



More information about the dancer-users mailing list