Dancer...::Ajax(3pm)
π Dancer::Plugin::Ajax β the manual page, bestie edition π
okay so before we even start: this is the manpage for Dancer::Plugin::Ajax(3pm), living in the User Contributed Perl Documentation section. Say hi. She's a plugin, she's cute, she adds Ajax route handlers, and she's about to make your whole webapp feel like main character energy. β¨
πΈ NAME πΈ
Dancer::Plugin::Ajax β a plugin for adding Ajax route handlers. that's the whole vibe. that's the job. π
π VERSION π
version 1.3522 β yes bestie, that's the number, we're not rounding it, we're not fixing it, it's iconic as-is. π₯
β¨ SYNOPSIS β¨
here's the little ritual you do to summon it:
package MyWebApp;
use Dancer;
use Dancer::Plugin::Ajax;
ajax '/check_for_update' => sub {
# ... some Ajax code
};
dance;
look at you, using Dancer, pulling in the plugin, dropping an ajax route like it's nothing, and then dance-ing. no cap, that's the whole flow. π¦
π« DESCRIPTION π«
so the ajax keyword that this plugin exports? it lets you define a route handler that's optimized for Ajax queries. fancier than your average route, fr fr.
your route handler code gets compiled to behave exactly like this, no more, no less:
- it passes if the request header
X-Requested-Withdoesn't equalXMLHttpRequestπ - it disables the layout (nope, no layout for you, this route is working solo)
- the action it builds matches
POST/GETrequests
and that's it. that's the whole personality. lowkey elegant, highkey useful. π
π CONFIGURATION π
by default the plugin rolls with a content-type of 'text/xml' β but bestie, you can absolutely override that with the plugin setting 'content_type'. your app, your rules. π«Ά
here's the example for switching to JSON, and honestly? she ate:
plugins:
'Ajax':
content_type: 'application/json'
π AUTHOR π
This module has been written by Alexis Sukrieh <sukria@sukria.net> β king behaviour. π
β AUTHOR β
Dancer Core Developers β the whole squad, assembled. π
π₯ COPYRIGHT AND LICENSE π₯
This software is copyright (c) 2010 by Alexis Sukrieh. π
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, no strings, just Perl energy. π
real talk bestie: free software is free software β the terms are literally "same as Perl 5", so go read those if you need the fine print. we keep every word.
and that's the page!! π this little beauty came from perl v5.40.1, dated 2026-05-05, and it's filed under Dancer...::Ajax(3pm). go forth and ajax responsibly, bestie. π¦β¨π
π¦ where this page comes from
- ubuntu stonking: libdancer-perl 1.3522-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms