Remove use of overload
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ActionContainer.pm
index e2292e0..31e36cd 100644 (file)
@@ -15,26 +15,20 @@ to represent the various dispatch points in your application.
 
 =cut
 
+use Class::C3;
 use Moose;
 
-use overload (
-
-    # Stringify to path part for tree search
-    q{""} => sub { shift->part },
-
-);
-
-has part    => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
+has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
 has actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
 
-around 'new' => sub {
-  my $next = shift;
+no Moose;
+
+sub new {
   my ($self, $params) = @_;
   $params = { part => $params } unless ref $params;
-  $next->($self, $params);
-};
+  $self->next::method($params);
+}
 
-no Moose;
 
 sub get_action {
     my ( $self, $name ) = @_;