Dancer2...sponses(3)

πŸ’– NAME πŸ’–

okay so bestie, welcome to Dancer2::Core::Role::StandardResponses β€” it's a role that hands you the commonly used responses so you don't have to hand-roll them every single time. it's giving "I got you, bestie" energy fr fr 🫢


✨ VERSION ✨

this is version 2.2.1 β€” iconic, we love a numbered queen πŸ‘‘


🌸 METHODS 🌸

πŸŽ€ response

it's the generic one!! you hand it a code and a message and it produces a custom response, just like that:

$self->response( $app, 404, 'Not Found' );

and lowkey the best part? you can use this to build your own version, totally separate from the standard one, if you're feeling creative:

$self->response( $app, 404, 'File missing in action' );

no cap, that's the whole vibe β€” code + message in, response out πŸ’…

πŸ¦‹ standard_response

this one is the chill one β€” it produces a standard response using just the code. no custom message needed, she already knows what to say:

# first example can be more easily written as
$self->standard_response( $app, 404 );

so like, that first example from up there? yeah, this is the glow-up version of it. same result, way less typing. ate. πŸ’…βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

Dancer Core Developers β€” the collective mother, honestly 🫢


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. so yes bestie, go off, remix it, share it, it's free fr fr πŸ’–


and that's a wrap!! this whole page is from perl v5.42.3, dated 2026-09-20, and it lives at Dancer2...sponses(3) in the User Contributed Perl Documentation corner of the world. mwah, periodt πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from