bye bye Class::C3. for good.
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ActionContainer.pm
index 9d41f4e..f3cb7e0 100644 (file)
@@ -17,21 +17,12 @@ to represent the various dispatch points in your application.
 
 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 actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
 
-around 'new' => sub {
-  my $next = shift;
-  my ($self, $params) = @_;
-  $params = { part => $params } unless ref $params;
-  $next->($self, $params);
+around new => sub {
+  my ($orig, $self, $params) = @_;
+  $orig->($self, (ref($params) ? $params :  { part => $params } ));
 };
 
 no Moose;