X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FEngine%2FHTTP%2FRestarter.pm;h=6b1b5f5c54e6fe84a8f83aa470ff7bffd7d1df36;hp=42f57ddb39078beeb5a97678acae8399e2b923b8;hb=0fc2d522eec43202c21e9f0062e43f10db4d9008;hpb=57a87bb3b029e5702f5fd0b7925cf6ab9c243596 diff --git a/lib/Catalyst/Engine/HTTP/Restarter.pm b/lib/Catalyst/Engine/HTTP/Restarter.pm index 42f57dd..6b1b5f5 100644 --- a/lib/Catalyst/Engine/HTTP/Restarter.pm +++ b/lib/Catalyst/Engine/HTTP/Restarter.pm @@ -1,10 +1,11 @@ package Catalyst::Engine::HTTP::Restarter; -use strict; -use warnings; -use base 'Catalyst::Engine::HTTP'; +use Class::C3; +use Moose; +extends 'Catalyst::Engine::HTTP'; +no Moose; + use Catalyst::Engine::HTTP::Restarter::Watcher; -use NEXT; sub run { my ( $self, $class, $port, $host, $options ) = @_; @@ -19,7 +20,11 @@ sub run { close STDOUT; my $watcher = Catalyst::Engine::HTTP::Restarter::Watcher->new( - directory => File::Spec->catdir( $FindBin::Bin, '..' ), + directory => ( + $options->{restart_directory} || + File::Spec->catdir( $FindBin::Bin, '..' ) + ), + follow_symlinks => $options->{follow_symlinks}, regex => $options->{restart_regex}, delay => $options->{restart_delay}, ); @@ -63,8 +68,8 @@ sub run { } } - return $self->NEXT::run( $class, $port, $host, $options ); -} + return $self->next::method( $class, $port, $host, $options ); +}; 1; __END__ @@ -84,11 +89,7 @@ and restart the server when any changes are detected. =head1 METHODS -=over 4 - -=item run - -=back +=head2 run =head1 SEE ALSO