package Catalyst::Engine::HTTP::Restarter::Watcher;
-use strict;
-use warnings;
-use base 'Class::Accessor::Fast';
+use Moose;
+with 'MooseX::Emulate::Class::Accessor::Fast';
+
use File::Find;
use File::Modified;
use File::Spec;
use Time::HiRes qw/sleep/;
-__PACKAGE__->mk_accessors(
- qw/delay
- directory
- modified
- regex
- follow_symlinks
- watch_list/
-);
-
-sub new {
- my ( $class, %args ) = @_;
-
- my $self = {%args};
-
- bless $self, $class;
+has delay => (is => 'rw');
+has regex => (is => 'rw');
+has modified => (is => 'rw');
+has directory => (is => 'rw');
+has watch_list => (is => 'rw');
+has follow_symlinks => (is => 'rw');
- $self->_init;
+no Moose;
- return $self;
+sub BUILD {
+ shift->_init;
}
sub _init {