projects
/
scpubgit/stemmatology.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
22f55ec
)
making tradition user become a weak ref
Eden Cardim [Mon, 13 Aug 2012 13:29:15 +0000 (10:29 -0300)]
lib/Text/Tradition.pm
patch
|
blob
|
blame
|
history
t/text_tradition_user_collapse.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Text/Tradition.pm
b/lib/Text/Tradition.pm
index
ce64e1d
..
ca0c5a4
100644
(file)
--- a/
lib/Text/Tradition.pm
+++ b/
lib/Text/Tradition.pm
@@
-68,6
+68,7
@@
has 'user' => (
required => 0,
predicate => 'has_user',
clearer => 'clear_user',
+ weak_ref => 1
);
has 'public' => (
diff --git
a/t/text_tradition_user_collapse.t
b/t/text_tradition_user_collapse.t
index
dca99bb
..
ce8e6bb
100644
(file)
--- a/
t/text_tradition_user_collapse.t
+++ b/
t/text_tradition_user_collapse.t
@@
-50,6
+50,7
@@
my $email = 'john@doe.com';
my $user = $user_store->find_user( { username => 'fred' } );
$user->email('foo@bar.baz');
$user_store->update($user);
+ is(scalar @{$user->traditions}, 1);
}
{