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 {
my @changes;
my @changed_files;
-
+
my $delay = ( defined $self->delay ) ? $self->delay : 1;
sleep $delay if $delay > 0;
regex => '\.yml$|\.yaml$|\.pm$',
delay => 1,
);
-
+
while (1) {
my @changed_files = $watcher->watch();
}