X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FUser.pm;fp=lib%2FCatalyst%2FAuthentication%2FUser.pm;h=5270d39ff393b190bf1bf430142af5b25cb048e0;hb=a2fb5d497103ab82ada4abb6bd54214a51dd6086;hp=8d811bc99a675ba0e2e7cd1391a6d7367cb1ed04;hpb=03a8931178152bebe5a1de20b7ed0fba3884f893;p=catagits%2FCatalyst-Plugin-Authentication.git diff --git a/lib/Catalyst/Authentication/User.pm b/lib/Catalyst/Authentication/User.pm index 8d811bc..5270d39 100644 --- a/lib/Catalyst/Authentication/User.pm +++ b/lib/Catalyst/Authentication/User.pm @@ -64,6 +64,13 @@ sub get_object { return shift; } +## obj is shorthand for get_object. This is originally from the DBIx::Class store, but +## as it has become common usage, this makes things more compatible. Plus, it's shorter. +sub obj { + my $self = shift; + return $self->get_object(@_); +} + ## Backwards Compatibility ## you probably want auth_realm, in fact. but this does work for backwards compatibility. ## store should be a read-write accessor - so it was moved to mk_accessors @@ -106,9 +113,18 @@ ID. An introspection method used to determine what features a user object has, to support credential and authorization plugins. -=head2 get( ) +=head2 get( $field ) + +Returns the value for the $field provided. =head2 get_object( ) +Returns the underlying object storing the user data. The return value of this function will vary depending +on the storage module used. + +=head2 obj( ) + +Shorthand for get_object( ) + =cut