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
35
votes
4 answers

An explanation of the nginx/starman/dancer web stack

I've been doing web-programming for a while now and am quite familiar with the LAMP stack. I've decided to try playing around with the nginx/starman/dancer stack and I'm a bit confused about how to understand, from a high-level, how all the pieces…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
28
votes
3 answers

Dancer vs Catalyst [Perl Web Frameworks]

What do you think about both? I began reading a book about Catalyst, and found it pretty complex as compared to Dancer. so now I'm giving Dancer a try, and it looks easier to learn and more "human friendly".
snoofkin
  • 8,725
  • 14
  • 49
  • 86
13
votes
4 answers

How can I start out with web development using Perl?

I want to be able to create web front-ends to my Perl programs. I have a lot of experience with Perl, and I have converted most of my code to Modern Perl paradigms championed by Chromatic. I have ZERO experience writing web pages though. (The…
BackPacker777
  • 673
  • 2
  • 6
  • 21
12
votes
3 answers

How do you stop a perl Dancer/Starman/Plack server?

I started a Dancer/Starman server using: sudo plackup -s Starman -p 5001 -E deployment --workers=10 -a mywebapp/bin/app.pl but I'm unsure how I can stop the server. Can someone provide me with a quick way of stopping it and all the workers it has…
Vijay Boyapati
  • 7,632
  • 7
  • 31
  • 48
9
votes
3 answers

Access Dancer Log object?

Normally when using dancer you call, for example debug 'foo'; and it will log the text. But I want to be able to log stuff in an object that doesn't import the dancer syntax. I'm wondering if there's a way to get dancer to just hand me it's log…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
9
votes
0 answers

uwsgi deployment using Emperor: Repeated "announcing my loyalty to the emperor"

Using uwsgi running two psgi Perl Dancer apps. Is it normal for uwsgi vassals to repeatedly announce their loyalty to the Emperor, upon nearly every request? Here's a small portion of my uwsgi.log file: announcing my loyalty to the Emperor... Mon…
yahermann
  • 1,539
  • 1
  • 12
  • 33
8
votes
1 answer

How can I test a Dancer application with Test::WWW::Mechanize::PSGI?

I'm not sure on the right way to set up the script app for www mechanize. I did try at least one alternate that works, however I'm trying to pass in configuration with the test so I can make logging quieter with the test suite. #!/usr/bin/perl use…
xenoterracide
  • 16,274
  • 24
  • 118
  • 243
8
votes
1 answer

How do I control a Dancer webapp's deployment?

Say I have a self-contained Dancer webapp. I can deploy it to a host by running a make dist, getting a tarball then installing it via cpanm or similar. However, I can't seem to find how to control this deployment. When I just make dist on the app,…
Oesor
  • 6,632
  • 2
  • 29
  • 56
8
votes
1 answer

template toolkit displays unique row

I am using Perl dancer2 to write an application. Running select query in mysql displays all records. But the same query run in dancer2 and template toolkit displays only unique records. Eg. 34 records fetched when this is run in mysql client. …
W R
  • 83
  • 1
  • 5
8
votes
2 answers

What exactly triggers jQuery ajax success?

I am building some ajax in a Perl web framework Dancer I am not sure it is responding with proper http headers as I cannot trigger jQuery's ajax success handlers from what appear to be otherwise successful requests. Using the ajax snippet below I…
kevzettler
  • 4,783
  • 15
  • 58
  • 103
7
votes
2 answers

What can I do to Makefile.PL so that when I run make test it runs the test suite with dancer environment set to 'test'?

I would like to be able to just type "make test" in a dancer app toplevel source directory (the one that was generated by "dancer -a appname") and have it run the tests with the environment set to 'test'. Or if anyone can point me to repository that…
holygeek
  • 15,653
  • 1
  • 40
  • 50
7
votes
2 answers

Multilingual PSGI-web deployment

I plan develop one web application with PSGI/Plack. (probaly with Dancer, but not decided yet). The applicatiion should be utf8, multilingual (with Locale::Maketext) and (ofc) will contain some statical pages in the given language. My idea is deploy…
clt60
  • 62,119
  • 17
  • 107
  • 194
7
votes
1 answer

How to handle SOAP service within persistent Perl web application with cookies?

Due to the fall of SOAP::WSDL which had generated me real Perl modules I have to look for something other in order to handle a SOAP service. The generated modules won't work starting from Perl v5.18. I have the following situation with my web…
burnersk
  • 3,320
  • 4
  • 33
  • 56
6
votes
1 answer

Perl Dancer after hook

Is there a way in Dancer to execute a code after every request? I tried with an after hook but it seems that it doesn't execute after a file request... There is a hook called 'after_file_render' which is executed a decent number of times after each…
bliof
  • 2,957
  • 2
  • 23
  • 39
6
votes
1 answer

What is the optimal --max-requests setting for Starman?

I am running a Dancer (v1.3202) app with Starman (v0.4014) and ngynx as a front end proxy. I am noticing a huge latency spike in my load balancer every couple of hours and wonder if it's the workers reaching their request limit and restarting. The…
MadHacker
  • 608
  • 5
  • 18
1
2 3
17 18