Dancer2::Core::DSL(3)

✨ NAME ✨

Dancer2::Core::DSL β€” it's Dancer2's Domain Specific Language (DSL), bestie πŸ’… it's literally the little toolbox of functions that makes writing Dancer2 apps feel like texting your group chat instead of, idk, writing Perl like it's 1998.


πŸŽ€ VERSION πŸŽ€

This is version 2.2.1 ✨


πŸ’– FUNCTIONS πŸ’–

🌸 setting

Okay so this one lets you define settings and access them β€” same function, two moods, very versatile of it 🫢

Define a single one:

setting('foo' => 42);

Define a whole little pile at once:

setting('foo' => 42, 'bar' => 43);

And then go get one back later:

my $foo=setting('foo');

And here's the tea β˜• β€” if settings were defined, it returns the number of settings. Not the value, the count. iykyk.

πŸ¦‹ set ()

Lowkey just an alias for setting β€” same energy, shorter name, main character typography ✨

set('foo' => '42');
my $port=set('port');
Not me pointing out that set does exactly what setting does β€” it's the same function wearing a different outfit πŸ’€ so use whichever one vibes with your codebase.

🌈 SEE ALSO 🌈


πŸ‘‘ AUTHOR πŸ‘‘

Dancer Core Developers πŸ’œ (the collective, the icons, the ones who did that)


This software is copyright (c) 2026 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. No cap, go wild, just keep the same terms 🫢


And that's the whole page, bestie β€” written for perl v5.42.3, dated 2026-09-20, and honestly? Obsessed. Slay, stay hydrated, and go define some settings πŸ’–βœ¨

πŸ“¦ where this page comes from