[Catalyst-dev] restart_directory override in HTTP engine

Matt S Trout dbix-class at trout.me.uk
Tue May 16 20:06:38 CEST 2006


Aran Deltac wrote:
> I'd like to be able to specify the directory that HTTP::Restarter
> searches for changed files in.  See the below patch.  I don't have
> commit bits for catalyst, so if its approved, could someone commit
> this for me?

Looks good to me, bar the distinct lack of docs and tests :)

> Aran
> 
> 
> Index: lib/Catalyst/Engine/HTTP/Restarter.pm
> ===================================================================
> --- lib/Catalyst/Engine/HTTP/Restarter.pm       (revision 4147)
> +++ lib/Catalyst/Engine/HTTP/Restarter.pm       (working copy)
> @@ -19,7 +19,10 @@
>          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, '..' )
> +            ),
>              regex     => $options->{restart_regex},
>              delay     => $options->{restart_delay},
>          );
> 
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst-dev


-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst-dev mailing list