mro compat stuff
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / HTTP / Restarter.pm
index 8e5c8c0..3eb7d04 100644 (file)
@@ -1,11 +1,14 @@
 package Catalyst::Engine::HTTP::Restarter;
 
+use MRO::Compat;
+use mro 'c3';
 use Moose;
 extends 'Catalyst::Engine::HTTP';
+no Moose;
+
 use Catalyst::Engine::HTTP::Restarter::Watcher;
 
-around run => sub {
-    my $orig = shift;
+sub run {
     my ( $self, $class, $port, $host, $options ) = @_;
 
     $options ||= {};
@@ -18,8 +21,8 @@ around run => sub {
         close STDOUT;
 
         my $watcher = Catalyst::Engine::HTTP::Restarter::Watcher->new(
-            directory => (
-                $options->{restart_directory} ||
+            directory => ( 
+                $options->{restart_directory} || 
                 File::Spec->catdir( $FindBin::Bin, '..' )
             ),
             follow_symlinks => $options->{follow_symlinks},
@@ -66,7 +69,7 @@ around run => sub {
         }
     }
 
-    return $self->$orig( $class, $port, $host, $options );
+    return $self->next::method( $class, $port, $host, $options );
 };
 
 1;