comparison auto-weave.pl @ 11:24ff8a9c76c4

all day for three lines
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 08:00:48 -0700
parents d09937a6cb4b
children be73e58d4b24
comparison
equal deleted inserted replaced
10:83e16df2288a 11:24ff8a9c76c4
1 #!/usr/bin/perl 1 #!/usr/bin/perl
2 2
3 use Linux::Inotify2; 3 use Linux::Inotify2;
4 use AnyEvent; 4 use WWW::Mechanize::Firefox;
5 5 my $mech = WWW::Mechanize::Firefox->new();
6 6
7 my $inotify = new Linux::Inotify2 7 my $inotify = new Linux::Inotify2
8 or die "unable to create new inotify object: $!"; 8 or die "unable to create new inotify object: $!";
9 9
10 10
38 $path =~ s|/home/r/proj|http://aurellem.localhost|; 38 $path =~ s|/home/r/proj|http://aurellem.localhost|;
39 print ("$path\n"); 39 print ("$path\n");
40 $path =~ s|org|html|g; 40 $path =~ s|org|html|g;
41 print ("$path\n"); 41 print ("$path\n");
42 #system ("firefox $path"); 42 #system ("firefox $path");
43 $mech->get($path);
43 $ignore_next = 1; 44 $ignore_next = 1;
44 45
45 }); 46 });
46 } 47 }
47 48