From: Jess Robinson Date: Thu, 24 May 2012 09:41:11 +0000 (+0000) Subject: Change Tradition comparing to use == (and assume we have the same reference) rather... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1906a56713cd28fa8f7e617e34700c5bb515240;p=scpubgit%2Fstemmatology.git Change Tradition comparing to use == (and assume we have the same reference) rather than ->name --- diff --git a/lib/Text/Tradition/User.pm b/lib/Text/Tradition/User.pm index 9ba694b..47ab694 100644 --- a/lib/Text/Tradition/User.pm +++ b/lib/Text/Tradition/User.pm @@ -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);