Questions tagged [dancer]

Dancer is a lightweight yet powerful web application framework for Perl, inspired by Sinatra. It aims to be simple, flexible, and easy to get to grips with.

Dancer is a micro web application framework for Perl, originally inspired by the Sinatra framework in Ruby.

Dancer is designed to be as effortless as possible for the developer, taking care of the boring bits as easily as possible, yet staying out of your way and letting you get on with writing your code.

Dancer offers the flexibility to scale between a very simple lightweight web service consisting of a few lines of code in a single file, all the way up to a much more complex fully-fledged web application with session support, templates for views and layouts, etc.

There are a wide variety of Dancer plugins available on CPAN to make common tasks easy (for example, database access, sending email, sending SMS text messages, interacting with Facebook).

There are also various template engine wrappers available for common templating engines such as Template Toolkit, HTML::Template, Mason and many more; writing additional wrappers for new templating engines is easy too.

Getting help

Dancer developers tend to monitor questions on Stackoverflow tagged 'dancer'.

There is an active IRC community on irc.perl.org/#perl (web chat client available).

There's also a mailing list.

Related tags:

264 questions
0
votes
2 answers

RYO blog engine - showing tags for several posts

I am writing yet another blog engine for practice, using SQLite and Perl Dancer framework. The tables go like this: CREATE TABLE posts ( p_id INTEGER PRIMARY KEY, p_url VARCHAR(255), p_title VARCHAR(255), p_text TEXT, p_date…
0
votes
2 answers

Dancer AJAX route with templates

I'm trying to show a template in an AJAX route like this: ajax '/login' => sub { my $user = params->{uname}; my $password = params->{upass}; my $db_inst = WebApp::Persistency::SQLiteDB->instance(); if…
snoofkin
  • 8,725
  • 14
  • 49
  • 86
-1
votes
1 answer

Plugin DSL method 'request' is deprecated. Use '$self->app->request' instead'

In perl, I am using Dancer 2 frame work, and using this plugin use Dancer2::Plugin::Deferred; use Dancer2::Plugin::Locale::Wolowitz; For statements like below: my $method = request->method(); my $params = request->params; I am getting following…
I_G
  • 13
  • 4
-1
votes
1 answer

Perl5 DBI Mysql: reliable way to get last_insert_id

In my code I use database->last_insert_id(undef,undef,undef,"id"); to get the autoincremented primary key. This works 99.99% of the time. But once in a while it returns a value of 0. In such situations, Running a select with a WHERE clause similar…
vijayvithal
  • 551
  • 1
  • 5
  • 13
-1
votes
2 answers

Dancer2 strange behaviour on get protocol

I'm building a webapp using dancer2 as backend tool. I've implemented the main method as follow: #!/usr/bin/env perl use Dancer2; get '/mything/:text' => sub { my @myArray = (""); # Fill the array with DB data; return join "
",…
Iván Rodríguez Torres
  • 4,293
  • 3
  • 31
  • 47
-1
votes
1 answer

update perl dancer framework resulting in error message

Following this tutorial "https://perlmaven.com/getting-started-with-perl-dancer" On Windows command line, I run the command "cpanm --verbose Dancer" and that resulted in error "Failed to download…
Dung
  • 19,199
  • 9
  • 59
  • 54
-1
votes
1 answer

How to implement advanced routing in perl dancer for RESTful webservices?

I would like to implement a RESTful webservice backend using perl dancer and want to understand whether (eventually how) I can implement a rest-enpoint like this: get qr{/this/:IS/one/:PATH/with/:MANY/variables/:ONEMORE} => sub() { # Does perl…
Gogi
  • 1,695
  • 4
  • 23
  • 36
-4
votes
1 answer

How do I pass mutiple column names to Perl Dancer's quick_select method?

I'm trying to use Perl Dancer quick_select to quickly fetch rows from the database. I'm using a list of items from the user that I got like this: my @arr=split(/,/, $inline); I keep getting this error when using the items from the…
Chip Dean
  • 4,222
  • 3
  • 24
  • 36
-5
votes
1 answer

How to get table values from template to subroutine?

I have one table with table_id="mytable" i need to send all the rows of the table in the action subroutine after clicking on submit. In the subroutine, I need to insert the rows one by one into a table after modifying some values. What is the…
Rony
  • 196
  • 2
  • 15
1 2 3
17
18