#!./perl -w

use strict;

use Event qw(time);

require Event::group;


my @varWatchers;

foreach (1..10)
 {
  no strict 'refs';

  push(@varWatchers, Event->var(var=>\${"var$_"}, cb=>sub {warn "Changed var $_.\n"}, poll=>'rw'));
 }

my $groupWatcher=Event->group(parked=>1, timeout => 2, cb => sub {my $e = shift; warn "All vars are still unchanged.\n";});

$groupWatcher->add($_) foreach (@varWatchers);

$groupWatcher->start;

Event::loop();
