# HG changeset patch # User Robert McIntyre # Date 1319555346 25200 # Node ID be73e58d4b2491561d83f5ea5f65c48da8f48867 # Parent 737c903fc815eddc33f0bb2edce5d34f5cbfb98b cleanup diff -r 737c903fc815 -r be73e58d4b24 auto-weave.pl --- a/auto-weave.pl Tue Oct 25 08:01:43 2011 -0700 +++ b/auto-weave.pl Tue Oct 25 08:09:06 2011 -0700 @@ -7,7 +7,6 @@ my $inotify = new Linux::Inotify2 or die "unable to create new inotify object: $!"; - @org_files = glob("./org/*.org"); $" = "\n"; @@ -28,32 +27,19 @@ $ignore_next = 0; return; } + $ignore_next = 1; my $e = shift; my $name = $e->fullname; print "$name was modified\n" if $e->IN_MODIFY; $output = `weave $name`; - print ("$name\n"); $path = `readlink -f $name`; $path =~ s|/home/r/proj|http://aurellem.localhost|; - print ("$path\n"); $path =~ s|org|html|g; - print ("$path\n"); - #system ("firefox $path"); $mech->get($path); - $ignore_next = 1; - }); } - - -# integration into AnyEvent (works with EV, Glib, Tk, POE...) -#my $inotify_w = AnyEvent->io -# ( -# fh => $inotify->fileno, poll => 'r', cb => sub { $inotify->poll } -# ); - - # manual event loop +# manual event loop 1 while $inotify->poll;