r12983@zaphod: kd | 2008-04-28 18:10:27 +1000
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / HTTP / Restarter / Watcher.pm
index b1ae9b7..da5b24f 100644 (file)
@@ -13,16 +13,10 @@ has directory => (is => 'rw');
 has watch_list => (is => 'rw');
 has follow_simlinks => (is => 'rw');
 
-sub new {
-    my ( $class, %args ) = @_;
+no Moose;
 
-    my $self = {%args};
-
-    bless $self, $class;
-
-    $self->_init;
-
-    return $self;
+sub BUILD {
+  shift->_init;
 }
 
 sub _init {
@@ -44,7 +38,7 @@ sub watch {
 
     my @changes;
     my @changed_files;
-
+    
     my $delay = ( defined $self->delay ) ? $self->delay : 1;
 
     sleep $delay if $delay > 0;
@@ -153,10 +147,10 @@ files
 
     my $watcher = Catalyst::Engine::HTTP::Restarter::Watcher->new(
         directory => '/path/to/MyApp',
-        regex     => '\.yml$|\.yaml$|\.pm$',
+        regex     => '\.yml$|\.yaml$|\.conf|\.pm$',
         delay     => 1,
     );
-
+    
     while (1) {
         my @changed_files = $watcher->watch();
     }
@@ -184,9 +178,7 @@ L<Catalyst>, L<Catalyst::Engine::HTTP::Restarter>, L<File::Modified>
 
 =head1 AUTHORS
 
-Sebastian Riedel, <sri@cpan.org>
-
-Andy Grundman, <andy@hybridized.org>
+Catalyst Contributors, see Catalyst.pm
 
 =head1 THANKS