App::Inotify::Hookable

Blocking command-line interface to inotify
Download

App::Inotify::Hookable Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ævar Arnfjörð Bjarmason
  • Publisher web site:
  • http://search.cpan.org/~avar/

App::Inotify::Hookable Tags


App::Inotify::Hookable Description

App::Inotify::Hookable is a simple command-line program is my replacement for the functionality offered by Plack's Filesys::Notify::Simple. I found that on very large git trees Plack would spend an inordinate amount watching the filesystem for changes.This program uses Linux::Inotify, so the kernel will notify it instantly when something changes (actually it's so fast that we have to work around how fast it sends us events).The result is that you can run this e.g. in a screen session and have it watch your development environment, and your webserver will have begun restarting before your finger leaves the save button.Currently the command-line interface for this is the only one that really makes sense, this module is entirely blocking (although it could probably run in another process via POE or something). Patches welcome.SYNOPSISWatch a directory, tell us when things change in it: inotify-hookable --watch-directories /tmp/watch-thisWatch a git tree, some configs, and a repository of static assets, restart the webserver or compress those assets if anything changes: inotify-hookable \ --watch-directories /etc/uwsgi \ --watch-directories /git_tree/central \ --watch-directories /etc/app-config \ --watch-directories /git_tree/static_assets \ --on-modify-path-command "^(/etc/uwsgi|/git_tree/central|/etc/app-config)=sudo /etc/init.d/uwsgi restart" \ --on-modify-path-command "^/git_tree/static_assets=(cd /git_tree/static_assets && compress_static_assets)"Product's homepage


App::Inotify::Hookable Related Software