start using Class::C3, may need to add a reinitalize bit later, not sure
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine / HTTP / Restarter / Watcher.pm
index b1ae9b7..9ad126e 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;
@@ -156,7 +150,7 @@ files
         regex     => '\.yml$|\.yaml$|\.pm$',
         delay     => 1,
     );
-
+    
     while (1) {
         my @changed_files = $watcher->watch();
     }