1<!DOCTYPE HTML> 2<html lang="en-US"> 3<head> 4 <meta charset="UTF-8"> 5 <title>Dancer - Perl Web Framework for easy and fun webapp development</title> 6 <meta name="description" content="PerlDancer is a micro perl web framework designed to be as effortless as possible for the developer. With PerlDancer, web development is fun again. It's a very expressive DSL for writing web applications with tons of plugins and a very dynamic community." /> 7 <meta name="keywords" content="Perl, Dancer, PerlDancer, framework, web framework, micro framework, web, web application, webapps" /> 8 <meta name="author" content="Alexis Sukrieh" /> 9 <meta name="robots" content="index,follow" /> 10 <meta name="copyright" content="Copyright 2009-2026 Alexis Sukrieh" /> 11 <meta name="google-site-verification" content="XINoghSibCxQxEzULZIDt-a_E0kWTQU7k54qPKwlLMw" /> 12 13 <link rel="stylesheet" href="/css/style.css?1" media="screen" /> 14 <link rel="stylesheet" href="/css/tweets.css" media="screen" /> 15 <!--[if gte IE 7]> 16 <link rel="stylesheet" href="/css/styleIE.css" /> 17 <![endif]--> 18 19 <!-- prettify --> 20 <link href="/css/prettify.css" type="text/css" rel="stylesheet" /> 21
21<script type="text/javascript" src="/javascripts/prettify.js"></script>
21 22 23 <!-- Grab Google CDN's jQuery. fall back to local if necessary --> 24
24<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
24 25
25<script type="text/javascript">/* <![CDATA[ */ 26 !window.jQuery && document.write('
26<script type="text/javascript" src="/javascripts/jquery.js"><\/script>') 27 /* ]]> */</script>
27 28 29
29<script defer data-domain="perldancer.org" src="https://plausible.io/js/script.js"></script>
29 30 31</head> 32<body onload="prettyPrint()"> 33 34<!-- START WAPPER HEADER --> 35<div id="wrapper-header"> 36 37 <!-- START HEADER --> 38 <div id="header"> 39 40 <h1><a href="/">Dancer - Perl web framework</a></h1> 41 <h2>The easiest way to write web applications in Perl</h2> 42 43 <!-- START NAV LEFT --> 44 <ul id="nav-left" class="clearme listreset"> 45 <li><a href="/quickstart" title="Get started quickly">Quick Start</a></li> 46 <li class="nav-sep"></li> 47 <li><a href="/documentation" title="Documentation">Docs</a></li> 48 <li class="nav-sep"></li> 49 <li><a href="/about" title="About the Dancer framework">About</a><li> 50 <li class="nav-sep"></li> 51 <li><a href="/irc" title="Talk to us on IRC">IRC</a></li> 52 </ul> 53 <!-- END NAV LEFT --> 54 55 <!-- START NAV RIGHT --> 56 <ul id="nav-right" class="clearme listreset"> 57 <li><a href="/contribute" title="Contributing to the project">Contribute</a></li> 58 <li class="nav-sep"></li> 59 60 <li><a href="/dancefloor" title="Who's using Dancer">Dancers</a></li> 61 <li class="nav-sep"></li> 62 63 <li><a href="/slides" title="Presentation slides">Slides</a></li> 64 </ul> 65 <!-- END NAV RIGHT --> 66 67 </div> 68 <!-- END HEADER --> 69 70 </div> 71 <!-- END WAPPER HEADER --> 72 73 74<div id="wrapper-contain"> 75 76 77 <div id="contain-top"></div> 78 <!-- START MAIN CONTAIN --> 79 <div id="contain" class="clearme"> 80 <h3>Quick Start</h3> 81 82<p> 83Getting started with Dancer is easy - we hope you'll be surprised how simple, 84fun and flexible building a website in Perl with Dancer can be. Even if you're 85a newcomer to Perl, you should find the simple things easy, and hard things 86possible. 87</p> 88 89<h3>Installing Dancer</h3> 90 91<p> 92For easy and automatic installation of Dancer, we recommend using 93<a href="https://metacpan.org/pod/distribution/Menlo/script/cpanm-menlo">cpanminus</a>: 94</p> 95 96<pre class="console"> 97curl -L https://cpanmin.us | perl - --sudo Dancer2 98</pre> 99 100<p> 101Of course, you can use any other CPAN client to do so, or even 102<a href="https://metacpan.org/pod/Dancer2">install it manually</a>. 103</p> 104 105 106<h3>Creating an application</h3> 107 108<p> 109A Dancer application can be as simple as a one-liner, but you may want to start 110with a complete structure for more complex applications. To help you do so, 111dancer is shipped with a helper that can scaffold a new skeleton for you. 112</p> 113 114<pre class="console"> 115$ dancer2 gen -a MyWeb::App 116+ MyWeb-App 117+ MyWeb-App/config.yml 118+ MyWeb-App/cpanfile 119+ MyWeb-App/Makefile.PL 120+ MyWeb-App/MANIFEST.SKIP 121+ MyWeb-App/bin 122+ MyWeb-App/bin/app.pl 123+ MyWeb-App/bin/app.psgi 124+ MyWeb-App/environments 125+ MyWeb-App/environments/development.yml 126+ MyWeb-App/environments/production.yml 127+ MyWeb-App/lib/MyWeb 128+ MyWeb-App/lib/MyWeb/App.pm 129+ MyWeb-App/public 130+ MyWeb-App/public/dispatch.cgi 131+ MyWeb-App/public/dispatch.fcgi 132+ MyWeb-App/public/404.html 133+ MyWeb-App/public/500.html 134+ MyWeb-App/public/favicon.ico 135+ MyWeb-App/public/css 136+ MyWeb-App/public/css/error.css 137+ MyWeb-App/public/css/style.css 138+ MyWeb-App/public/images 139+ MyWeb-App/public/images/perldancer-bg.jpg 140+ MyWeb-App/public/images/perldancer.jpg 141+ MyWeb-App/public/javascripts 142+ MyWeb-App/public/javascripts/jquery.js 143+ MyWeb-App/t 144+ MyWeb-App/t/001_base.t 145+ MyWeb-App/t/002_index_route.t 146+ MyWeb-App/views 147+ MyWeb-App/views/index.tt 148+ MyWeb-App/views/layouts 149+ MyWeb-App/views/layouts/main.tt 150</pre> 151 152<p>Everything is ready and works out of the box (with a nice design, jQuery and 153environment-related configurations). 154</p> 155 156<h3>Starting to dance</h3> 157 158<pre class="console"> 159$ cd MyWeb-App 160$ plackup -r bin/app.psgi 161>> Dancer server 16622 listening on https://0.0.0.0:5000 162== Entering the development dance floor ... 163</pre> 164 165<p> 166Note that a Dancer startup script is also a <a 167href="https://plackperl.org">PSGI</a> application. 168</p> 169 170<!-- 171<p> 172See <a href="https://p3rl.org/Dancer::Deployment">Dancer::Deployment</a> for 173more ways to deploy your Dancer applications. 174</p> 175--> 176 177<h3>Learning more moves</h3> 178 179<p> 180Resources to learn more: 181</p> 182 183<ul> 184 <li><a href="/cheatsheet">A cheatsheet</a> (PDF or ODS) by Vladimir Lettiev
185 (thecrux)</li> 186 <li><a href="https://p3rl.org/Dancer2::Manual">Dancer2::Manual</a> 187 - a gentle introduction to Dancer2</li> 188 <li><a href="https://p3rl.org/Dancer2::Tutorial">Dancer2::Tutorial</a> - a 189 walkthrough creating an example application</a></li> 190 <li><a href="https://p3rl.org/Dancer2::Manual::Cookbook">Dancer2::Manual::Cookbook</a> - 191 examples for achieving common tasks with Dancer2</li> 192 <li><a href="https://p3rl.org/Dancer2::Manual::Keywords">Dancer2::Manual::Keywords</a> - a guide 193 listing all the Dancer DSL keywords</li> 194 <li><a href="https://p3rl.org/Dancer2::Manual::Plugins">Dancer2::Manual::Plugins</a> - a list 195 of some recommended plugins to extend Dancer2 with useful features</li> 196 <li><a href="https://p3rl.org/Dancer2::Manual::Deployment">Dancer2::Manual::Deployment</a> - 197 how to deploy your app</li> 198 <li><a href="https://p3rl.org/Task::Dancer2">Task::Dancer2</a> - comprehensive 199 list of Dancer2 plugins, template/session/logger engines, etc. on the CPAN </li> 200</ul> 201 202 203 204<h3>Books about Perl Dancer</h3> 205<p> 206<ul> 207 <li><a href="https://leanpub.com/dancer-spa/">Single Page Application with Perl Dancer</a> by Gabor Szabo.</li> 208</ul> 209</p> 210 211<h3>Articles about Perl Dancer</h3> 212<p> 213<ul> 214 <li><a href="https://perlhacks.com/2024/05/deploying-dancer-apps/">Deploying Dancer Apps</a> by Dave Cross</li> 215 <li><a href="https://perlhacks.com/2024/08/deploying-dancer-apps-addendum/">Deploying Dancer Apps (Addendum)</a> by Dave Cross</li> 216 <li><a href="https://perlhacks.com/2025/05/deploying-dancer-apps-the-next-generation/">Deploying Dancer Apps â The Next Generation</a> by Dave Cross</li> 217</ul> 218</p> 219 220<h3>New to Perl, too?</h3> 221 222<p> 223If you're looking to learn to use Perl, we hope that the simplicity and ease of 224getting started with Dancer will be very helpful to you; however, you'll 225probably also want to find some decent tutorials and resources to learn about 226Perl itself. Do be wary of some of the results which Google will turn up - 227there's some very outdated and inadvisable tutorials out there. 228</p> 229 230<p> 231The following is a short, non-exhaustive list of resources which are likely to 232be of use to Perl beginners: 233</p> 234 235<ul> 236<li><a href="https://perl-tutorial.org/">Perl tutorials at perl-tutorial.org</a> 237- a site listing various modern Perl tutorials</li> 238<li><a href="https://learn.perl.org/">learn.perl.org</a></li> 239<li><a href="https://learn.perl.org/books/beginning-perl/">Beginning Perl</a> - a 240book by Simon Cozens, available completely free online</li> 241<li><a href="https://perlmaven.com/perl-tutorial">Perl 242Tutorial</a> - the Perl Maven tutorial by Gabor Szabo</li> 243<li><a href="https://perldoc.perl.org/">perldoc</a> - the Perl documentation 244online</li> 245</ul> 246 247 248 </div> 249 <!-- END MAIN CONTAIN --> 250 251 <div id="contain-bottom"></div> 252 253 <div id="copyright">Dancer Perl web framework is copyright © 2009-2026 <a href="http://sukria.net/" rel="external">Alexis Sukrieh</a> - 254 <a href="http://twitter.com/PerlDancer/">Twitter</a> - 255 <a href="https://github.com/PerlDancer/Dancer2/fork" rel="external">Fork on GitHub</a>. 256 <br> 257 This website is <a href="http://github.com/PerlDancer/perldancer-website/" rel="external">free software</a> last updated: <a href="https://github.com/PerlDancer/perldancer-website/commit/abffb0a89f5d5952b4f6dd2d65cbd79fa861938a" rel="external">Sun Oct 19 20:32:18 2025 -0400</a> 258 </div> 259 260</div> 261 262<!-- JAVASCRIPTS CALLING -->
263<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
vendor: 1 bytes, line 263
263
264<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.min.js" integrity="sha256-lSjKY0/srUM9BE3dPm+c4fBo1dky2v27Gdjm2uoZaL0=" crossorigin="anonymous"></script>
264 265
266<script src="/javascripts/perlDancer.js?1"></script>
266 267 268<a href="https://github.com/PerlDancer/Dancer2/fork"><img src="/images/forkme_right_darkblue_121621.svg" style="position:absolute;top:0;right:0;" alt="Fork me on GitHub"></a> 269 270</body> 271</html>
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.