explicitly call auto_create and auto_update properly. jayk -- fix them docs. :)
Brian Cassidy [Wed, 23 Jan 2008 19:02:18 +0000 (19:02 +0000)]
Changes
lib/Catalyst/Authentication/Store/DBIx/Class.pm
lib/Catalyst/Authentication/Store/DBIx/Class/User.pm

diff --git a/Changes b/Changes
index 65a8bec..cf7cc1d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,11 @@
 Revision history for Catalyst-Plugin-Authentication-Store-DBIx-Class
 
+0.102   2008-01-23
+        Catalyst::Authentication::Store::DBIx::Class::User
+          - Explicitly call auto_create() against resultset()
+          - Explicitly call auto_update() against _user()
+          - Document the above
+
 0.101   2007-12-02
         Implemented basic auto_update_user and auto_create_user support
 
index 7563ea5..e7379d0 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use base qw/Class::Accessor::Fast/;
 
-our $VERSION= "0.101";
+our $VERSION= "0.102";
 
 
 BEGIN {
index fb6dfd9..dcc40ef 100644 (file)
@@ -168,6 +168,17 @@ sub obj {
     return $self->get_object;
 }
 
+sub auto_create {
+    my $self = shift;
+    $self->_user( $self->resultset->auto_create( @_ ) );
+    return $self;
+}
+
+sub auto_update {
+    my $self = shift;
+    $self->_user->auto_update( @_ );
+}
+
 sub AUTOLOAD {
     my $self = shift;
     (my $method) = (our $AUTOLOAD =~ /([^:]+)$/);
@@ -244,6 +255,16 @@ Retrieves the DBIx::Class object that corresponds to this user
 
 Synonym for get_object
 
+=head2 auto_create
+
+This will delegate a call to the C<auto_create()> method of the resultset associated
+with this object. It is up to you to implement that method.
+
+=head2 auto_update
+
+This will delegate a call to the C<auto_create()> method of the current instance of the resultset
+associated with this object. It is up to you to implement that method.
+
 =head1 BUGS AND LIMITATIONS
 
 None known currently, please email the author if you find any.