From: Florian Ragwitz Date: Mon, 29 Jun 2009 22:05:02 +0000 (+0000) Subject: Remove <=> overloading for actions. X-Git-Tag: 5.80006~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=cb3d811c733d46b4b90e43987ab00e4a02be398b Remove <=> overloading for actions. --- diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index 1649f35..cd2d008 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -37,9 +37,6 @@ use overload ( # Codulate to execute to invoke the encapsulated action coderef '&{}' => sub { my $self = shift; sub { $self->execute(@_); }; }, - # Which action takes precedence - '<=>' => 'compare', - # Make general $stuff still work fallback => 1, @@ -124,8 +121,6 @@ Always returns true if Args is omitted. Compares 2 actions based on the value of the C attribute, with no C having the highest precedence. -C<< <=> >> is overloaded to use this method. - =head2 namespace Returns the private namespace this action lives in. diff --git a/lib/Catalyst/DispatchType/Path.pm b/lib/Catalyst/DispatchType/Path.pm index bff5f21..95367ac 100644 --- a/lib/Catalyst/DispatchType/Path.pm +++ b/lib/Catalyst/DispatchType/Path.pm @@ -119,7 +119,7 @@ sub register_path { $path =~ s{(?<=[^/])/+\z}{}; $self->_paths->{$path} = [ - sort { $a <=> $b } ($action, @{ $self->_paths->{$path} || [] }) + sort { $a->compare($b) } ($action, @{ $self->_paths->{$path} || [] }) ]; return 1;