diff options
author | mateu <mateu@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-07-28 13:30:05 +0000 |
---|---|---|
committer | mateu <mateu@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-07-28 13:30:05 +0000 |
commit | 81cb15f7aa10244bab691f3beb48ff71aa6dd7ac (patch) | |
tree | 91bb487eda82b0ec15e39020231b2f2bb3340348 | |
parent | b4e081f82ee3491636b87a027e8eee2533b520f1 (diff) | |
download | reaction-81cb15f7aa10244bab691f3beb48ff71aa6dd7ac.tar.gz reaction-81cb15f7aa10244bab691f3beb48ff71aa6dd7ac.zip |
Avoid circular refs with target_model for login actions
-rw-r--r-- | lib/Reaction/InterfaceModel/Action/User/Login.pm | 3 |
1 files changed, 2 insertions, 1 deletions
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); |