Remove use of overload
[catagits/Catalyst-Runtime.git] / lib / Catalyst / ActionContainer.pm
index ee7cfa7..31e36cd 100644 (file)
@@ -15,19 +15,20 @@ to represent the various dispatch points in your application.
 
 =cut
 
+use Class::C3;
 use Moose;
 
-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 ) = @_;
@@ -41,6 +42,8 @@ sub add_action {
     $self->actions->{$name} = $action;
 }
 
+__PACKAGE__->meta->make_immutable;
+
 1;
 
 __END__
@@ -76,7 +79,7 @@ Provided by Moose
 
 =head1 AUTHOR
 
-Matt S. Trout 
+Matt S. Trout
 
 =head1 COPYRIGHT