X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FHTTP%2FRestarter.pm;h=8e5c8c093c81db700417b53c5e2ec6d5699beb4f;hb=e5ecd5bc38bac3e2fcfaf643ea2a4c6ab46d7e57;hp=30cb9e4b3a9f77dc2e3dc16f997c4e01255915d0;hpb=9e800f69753d858a230a0c48effd43457b07d3cc;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Engine/HTTP/Restarter.pm b/lib/Catalyst/Engine/HTTP/Restarter.pm index 30cb9e4..8e5c8c0 100644 --- a/lib/Catalyst/Engine/HTTP/Restarter.pm +++ b/lib/Catalyst/Engine/HTTP/Restarter.pm @@ -1,12 +1,11 @@ package Catalyst::Engine::HTTP::Restarter; -use strict; -use warnings; -use base 'Catalyst::Engine::HTTP'; +use Moose; +extends 'Catalyst::Engine::HTTP'; use Catalyst::Engine::HTTP::Restarter::Watcher; -use NEXT; -sub run { +around run => sub { + my $orig = shift; my ( $self, $class, $port, $host, $options ) = @_; $options ||= {}; @@ -19,10 +18,11 @@ sub run { 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}, regex => $options->{restart_regex}, delay => $options->{restart_delay}, ); @@ -66,8 +66,8 @@ sub run { } } - return $self->NEXT::run( $class, $port, $host, $options ); -} + return $self->$orig( $class, $port, $host, $options ); +}; 1; __END__