Cataly...erface(3pm)
π Catalyst::Exception::Interface β the vibe check for Catalyst exceptions π
okay bestie, so this page is Cataly...erface(3pm) from the User Contributed Perl Documentation, and it's literally the role that defines the interface for Catalyst exceptions. yes, that role. the one that makes sure your exception class isn't out here doing its own thing. sit down, hydrate, we're learning π«Ά
β¨ NAME β¨
Catalyst::Exception::Interface β Role defining the interface for Catalyst exceptions.
like, it's a role. it defines an interface. for Catalyst exceptions. it's giving exactly what it says on the tin π
πΈ SYNOPSIS πΈ
package My::Catalyst::Like::Exception;
use Moose;
use namespace::clean -except => 'meta';
with 'Catalyst::Exception::Interface';
# This comprises the required interface.
sub as_string { 'the exception text for stringification' }
sub throw { shift; die @_ }
sub rethrow { shift; die @_ }
okay so that comment in there? # This comprises the required interface. β that's not decorative, bestie. that's the whole entire point. those three subs are the required interface. that's it. that's the assignment. β¨
π¦ DESCRIPTION π¦
This is a role for the required interface for Catalyst exceptions.
It ensures that all exceptions follow the expected interface, and adds overloading for stringification when composed onto a class.
so real talk: this role is the group chat admin. it keeps everybody on the same page. if you compose it onto your class, it (1) makes sure your exceptions stick to the expected interface, and (2) adds overloading for stringification. so when your exception gets stringified, it knows what to do instead of just... sitting there. iconic behaviour, no cap π
π REQUIRED METHODS π
you literally must have these. no skipping. no "i'll add it later." it's giving syllabus day and attendance is mandatory.
as_string
throw
rethrow
yes that's the entire list, that's the whole section, and yes they're all required. periodt π
π₯ METHODS π₯
meta
Provided by Moose.
it's not yours, it's not mine, it's Moose's. Moose handed it to you. say thank you. π
π SEE ALSO π
CatalystCatalyst::Exception
go read those too, bestie, iykyk π
π AUTHORS π
Catalyst Contributors, see Catalyst.pm.
not a single name, not even a "me". just the collective. the group chat wrote this. we all did. π«Ά
β COPYRIGHT β
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
free as in freedom, free as in "go ahead bestie, remix it", under the same terms as Perl itself. slay. π
ngl this page is short but it ate. tiny role, huge responsibility. don't skip the required methods or the vibe check will find you π
and that's the whole page, babes β this was Cataly...erface(3pm) from perl v5.40.0, dated 2024-11-15, and yes the header/footer truncation is just the manpage doing its little thing πΈ bye bye, go write your exception class correctly π
β¨
π¦ where this page comes from
- debian trixie: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-perl 5.90132-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-perl 5.90132-1 Β· 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