From 81cb15f7aa10244bab691f3beb48ff71aa6dd7ac Mon Sep 17 00:00:00 2001 From: mateu Date: Tue, 28 Jul 2009 13:30:05 +0000 Subject: Avoid circular refs with target_model for login actions --- lib/Reaction/InterfaceModel/Action/User/Login.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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); -- cgit v1.2.3-54-g00ecf