Cataly...::User(3pm)
π Catalyst::Authentication::User β the user object glow-up π
okay so real talk, this is Catalyst::Authentication::User from the User Contributed Perl Documentation section 3pm, and it's the base class for user objects. She's giving foundational icon, not finished product. Let's get into it π
β¨ NAME β¨
Catalyst::Authentication::User β the base class for user objects, bestie. That's it, that's the whole name. π
πΈ SYNOPSIS πΈ
like, here's how you'd actually adopt her into your own code:
package MyStore::User;
use base qw/Catalyst::Authentication::User/;
that's literally it, you just subclass and go off π
π¦ DESCRIPTION π¦
So this is the base class for authentication user objects. Main character energy, but in a supportive-role kinda way.
THIS IS NOT A COMPLETE CLASS! like, for real fr fr β she is intended to provide base functionality only. Do not expect a whole finished human being here π
What she does do: she provides the base methods listed below (see METHODS, keep scrolling babe), and any additional methods β yes, any β get proxied onto the user object fetched from the underlieing store. (Their spelling, not mine, but the vibe is preserved π«Ά) So if you call something she doesn't know, she just hands it off to the store object. Delegation queen. β¨
π NOTES TO STORE IMPLEMENTORS π
Okay so if you're the one writing a store, listen up π β please read the comments in the source code of this class to work out which methods you should override. That's the assignment. The source comments are the syllabus. iykyk π
π METHODS π
id( )
A unique ID by which a user can be retrieved from the store. Think of it as the user's handle β the thing you'd use to go refetch them later. β
store( )
Should return a class name that can be used to refetch the user using it's ID. (Again, their apostrophe. I don't make the rules, I just relay them π) So: class name out, and that class knows how to find the user again given the ID.
supports( )
An introspection method used to determine what features a user object has, to support credential and authorization plugins. Basically a vibe check for capabilities β she tells you what she's about so the credential and authorization plugins know what they can do with her. πΈ
get( $field )
Returns the value for the $field provided. That's it. You ask for a field, you get the value. Simple, clean, iconic. π
get_object( )
Returns the underlying object storing the user data. Important caveat though β the return value of this method will vary depending on the storage module used. So don't assume a shape, bestie, because there isn't one guaranteed shape π
obj( )
Shorthand for get_object( ). Same thing, shorter to type. We love a low-effort alias. π
AUTOLOAD
Delegates any unknown methods onto the user object returned by ->obj. So anything she doesn't personally implement gets yeeted over to ->obj's object. Unknown method? Not a problem, just a delegation moment. π§
π« cute lil sign-off π«
and that's the whole page, bestie! filed under Cataly...::User(3pm), source and version perl v5.40.1, dated 2026-05-22, from the User Contributed Perl Documentation. go forth and subclass responsibly πππ₯
π¦ where this page comes from
- ubuntu stonking: libcatalyst-plugin-authentication-perl 0.10026-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms