Dancer::Engine(3pm)
π Dancer::Engine π
okay bestie, so this is the manual page for Dancer::Engine, straight out of the User Contributed Perl Documentation section (it's a 3pm page, iykyk). Sit down, grab a strawberry π, and let's get into it.
β¨ NAME β¨
Dancer::Engine β the base class for Dancer engines. that's it. that's the name.
πΈ VERSION πΈ
version 1.3522 β yes, that's the number, no notes π
π SYNOPSIS π
the little teaser, the vibe check, the trailer:
my $engine = Dancer::Engine->build( Serializer => 'JSON', $configuration );
that's literally the whole flex β¨
π¦ DESCRIPTION π¦
okay so Dancer has a lot of engines. Serializer engines, Template engines, Logger engines, Session handlers engines β the whole squad. And Dancer::Engine is the base class for all of them. every single one. periodt.
now, if you're writing an engine of a common type (like the ones I just listed above, bestie, keep up π«Ά), you probably don't even wanna touch this class directly β you'd want to just use their base class, which in turn uses Dancer::Engine. so for example:
- Template engines inherit from
Dancer::Template::Abstract - Serializer engines inherit from
Dancer::Serializer::Abstract
and those Abstract base classes? they're the ones inheriting from Dancer::Engine. it's giving family tree π³
and if a new type of Dancer engine gets created? no cap, it is best if it inherits from this class. that's the move. that's the assignment. π
π ATTRIBUTES π
name
The name of the engine, such as JSON, or Simple. π·οΈ
type
The type of the engine, such as Serializer, or Session. π§
π METHODS/SUBROUTINES π
config
Fetches the configuration of the engine.
my $configuration = $engine->config;
β οΈ important bestie: you can only set the configuration at initialization time, not after. so decide early, no take-backs, the config is not flexible like that π
build
Builds and returns the engine. it's a constructor, it's a glow-up, it's iconic.
my $engine = Dancer::Engine->build( $type => $name, $config );
π AUTHOR π
Dancer Core Developers β the whole crew, giving main character energy, we stan π
π 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.
and that's the vibe check, bestie β this page is from perl v5.40.1, dated 2026-05-05. slay, go build some engines πβ¨π
π¦ 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