[Catalyst-commits] r10084 - Catalyst-Devel/1.00/branches/improved-restarter/lib/Catalyst

autarch at dev.catalyst.perl.org autarch at dev.catalyst.perl.org
Tue May 12 02:22:56 GMT 2009


Author: autarch
Date: 2009-05-12 02:22:55 +0000 (Tue, 12 May 2009)
New Revision: 10084

Modified:
   Catalyst-Devel/1.00/branches/improved-restarter/lib/Catalyst/Restarter.pm
Log:
Add a default directory if none is specific.

This was in File::ChangeNotify but it's really Catalyst-specific, and
doesn't belong there.


Modified: Catalyst-Devel/1.00/branches/improved-restarter/lib/Catalyst/Restarter.pm
===================================================================
--- Catalyst-Devel/1.00/branches/improved-restarter/lib/Catalyst/Restarter.pm	2009-05-12 00:03:20 UTC (rev 10083)
+++ Catalyst-Devel/1.00/branches/improved-restarter/lib/Catalyst/Restarter.pm	2009-05-12 02:22:55 UTC (rev 10084)
@@ -2,7 +2,9 @@
 
 use Moose;
 
+use Cwd qw( abs_path );
 use File::ChangeNotify;
+use FindBin;
 use namespace::clean -except => 'meta';
 
 has start_sub => (
@@ -28,6 +30,7 @@
     delete $p->{start_sub};
 
     $p->{filter} ||= qr/(?:\/|^)(?!\.\#).+(?:\.yml$|\.yaml$|\.conf|\.pm)$/;
+    $p->{directories} ||= abs_path( File::Spec->catdir( $FindBin::Bin, '..' ) );
 
     # We could make this lazily, but this lets us check that we
     # received valid arguments for the watcher up front.




More information about the Catalyst-commits mailing list