Skip to content

Instantly share code, notes, and snippets.

@autarch
Created January 30, 2017 17:21
Show Gist options
  • Select an option

  • Save autarch/6425ca143c6027445421fd7a8899d58b to your computer and use it in GitHub Desktop.

Select an option

Save autarch/6425ca143c6027445421fd7a8899d58b to your computer and use it in GitHub Desktop.
use strict;
use warnings;
{
package Foo;
use Moose;
has foo => (
is => 'ro',
does => 'File::ChangeNotify::Watcher',
);
}
use Devel::Confess;
use File::ChangeNotify::Watcher::Default;
Foo->new( foo =>
File::ChangeNotify::Watcher::Default->new( directories => ['~/tmp'] )
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment