package Catalyst::Engine::HTTP::Restarter::Watcher;
use Moose;
+with 'MooseX::Emulate::Class::Accessor::Fast';
+
use File::Find;
use File::Modified;
use File::Spec;
has modified => (is => 'rw');
has directory => (is => 'rw');
has watch_list => (is => 'rw');
-has follow_simlinks => (is => 'rw');
-
-sub new {
- my ( $class, %args ) = @_;
-
- my $self = {%args};
+has follow_symlinks => (is => 'rw');
- bless $self, $class;
+no Moose;
- $self->_init;
-
- return $self;
+sub BUILD {
+ shift->_init;
}
sub _init {
my $watcher = Catalyst::Engine::HTTP::Restarter::Watcher->new(
directory => '/path/to/MyApp',
- regex => '\.yml$|\.yaml$|\.pm$',
+ regex => '\.yml$|\.yaml$|\.conf|\.pm$',
delay => 1,
);
=head1 AUTHORS
-Sebastian Riedel, <sri@cpan.org>
-
-Andy Grundman, <andy@hybridized.org>
+Catalyst Contributors, see Catalyst.pm
=head1 THANKS