From: mateu Date: Tue, 28 Jul 2009 13:30:05 +0000 (+0000) Subject: Avoid circular refs with target_model for login actions X-Git-Tag: v0.002000~55 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=81cb15f7aa10244bab691f3beb48ff71aa6dd7ac;p=catagits%2FReaction.git Avoid circular refs with target_model for login actions --- diff --git a/lib/Reaction/InterfaceModel/Action/User/Login.pm b/lib/Reaction/InterfaceModel/Action/User/Login.pm index 31abd8b..21c5e03 100644 --- a/lib/Reaction/InterfaceModel/Action/User/Login.pm +++ b/lib/Reaction/InterfaceModel/Action/User/Login.pm @@ -7,7 +7,8 @@ use Reaction::Types::Core qw(SimpleStr Password); use namespace::clean -except => [ qw(meta) ]; extends Action; - +# Avoid circular ref with target_model for Auth controller login actions. +sub BUILD { Scalar::Util::weaken($_[0]->{target_model}) } has 'username' => (isa => SimpleStr, is => 'rw', lazy_fail => 1); has 'password' => (isa => Password, is => 'rw', lazy_fail => 1);