Change Tradition comparing to use == (and assume we have the same reference) rather...
Jess Robinson [Thu, 24 May 2012 09:41:11 +0000 (09:41 +0000)]
lib/Text/Tradition/User.pm

index 9ba694b..47ab694 100644 (file)
@@ -32,7 +32,7 @@ sub remove_tradition {
 
     ## FIXME: Is "name" a good unique field to compare traditions on?
     my @traditions = @{$self->traditions};
-    @traditions = grep { $tradition->name ne $_->name } @traditions;
+    @traditions = grep { $tradition != $_ } @traditions;
 
     $tradition->clear_user;
     $self->traditions(\@traditions);