Generated by GPT-5-mini| Perl Dancer | |
|---|---|
| Name | Perl Dancer |
| Developer | Florian Ragwitz, Alexis Sukrieh, others |
| Initial release | 2009 |
| Programming language | Perl |
| Platform | Cross-platform |
| License | Artistic License 2.0 |
Perl Dancer is a lightweight web application framework for the Perl programming language designed to simplify HTTP application development with a Sinatra-inspired API. It emphasizes minimalism, rapid development, and extensibility for creating web services, RESTful APIs, and full-stack applications. The framework integrates with web servers, template systems, and database ORMs to enable production deployments and developer workflows.
Perl Dancer provides a concise routing DSL and middleware integration similar to approaches used by Sinatra (software), Ruby on Rails, Mojolicious, Node.js, and Flask (web framework). Its core focuses on request routing, response handling, session management, and template rendering, interoperating with web servers such as Apache HTTP Server, Nginx, Lighttpd, and Starman. The project is maintained by contributors from communities around CPAN, GitHub, and various Perl user groups like Perl Mongers, with releases coordinated alongside modules like DBI and Plack.
Perl Dancer originated as an effort to bring a simplified web framework to the Perl ecosystem, following influence from Sinatra (software) and earlier Perl projects including Catalyst (software) and CGI.pm. Early development involved contributors such as Florian Ragwitz and Alexis Sukrieh and aligned with CPAN distribution practices used by projects like Module::Build and Dist::Zilla. Over time the project evolved through versions reflecting the growth of community tooling represented by GitHub, RT (Request Tracker), and events like YAPC::Europe and Perlbrew workshops. Major milestones paralleled adoption of PSGI/Plack standards introduced alongside PSGI and Plack to decouple server and application layers.
The framework implements a routing layer, middleware, and templating abstractions while adhering to the PSGI specification used by Plack and servers such as Starman and Twiggy. Core features include a domain-specific routing language, HTTP verb mapping, request and response objects, session backends compatible with FastMmap and CHI, and built-in helpers for cookies, static files, and JSON handling. Template support spans engines like Template Toolkit, Mason, HTML::Template, and Xslate, and persistence integrations commonly use DBI, DBIx::Class, and Mojo::Pg adapters. Authentication and authorization extensions draw from patterns used in OAuth, LDAP, and OpenID integrations seen in other ecosystems. The project architecture embraces modularity with middleware patterns comparable to Rack (webserver interface) and Rack middleware approaches from the Ruby (programming language) community.
Perl Dancer’s ecosystem on CPAN includes hundreds of plugins and modules: session stores like Dancer::Session::DBIC and caching connectors like Dancer::Plugin::Cache, template helpers such as Dancer::Template::TT, database adapters like Dancer::Plugin::Database that wrap DBI and DBIx::Class, and testing helpers mirroring practices from Test::More and Test::WWW::Mechanize::PSGI. Community extensions provide OAuth support similar to Net::OAuth, JSON handling akin to JSON::XS, and form validation using patterns from Data::FormValidator. Integration modules enable deployment with systemd, Docker, and continuous integration platforms influenced by Travis CI and GitHub Actions. Documentation and tutorials appear in venues like PerlMonks, MetaCPAN, and conference talks at YAPC::NA.
Organizations and projects adopt Perl Dancer for internal tools, RESTful microservices, and web APIs where rapid prototyping and maintainability are priorities. Use cases mirror deployments found in sectors represented by European Union, NASA, University of Cambridge, and startups that leverage Perl stacks alongside PostgreSQL, MySQL, Redis, and Elasticsearch. Perl Dancer is chosen for integration with legacy systems maintained using Legacy Perl codebases and for scripts migrated from CGI and mod_perl environments. It is also used in educational settings at meetups like Perl Workshop and conferences such as Open Source Summit.
Performance characteristics depend on PSGI server selection: on event-driven servers like Twiggy or worker servers like Starman throughput and latency differ, and tuning parallels practices from Nginx and HAProxy load balancing. Benchmarks typically compare Perl Dancer with frameworks such as Mojolicious, Catalyst (software), Sinatra (software), Flask (web framework), and Express (web framework), showing trade-offs between minimalism and feature-rich frameworks. Profiling and optimization workflows commonly use tools like Devel::NYTProf and monitoring stacks incorporating Prometheus and Grafana for production observability.
Category:Perl web frameworks