#!./perl -w

use strict;

use Event qw(time);

require Event::group;


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

# install several var watchers and made them watched by the group watcher
foreach (1..10)
 {
  no strict 'refs';
  $groupWatcher->add(Event->var(var=>\${"var$_"}, cb=>sub {warn "Changed var $_.\n"}, poll=>'rw'));
 }

# activate group watcher
$groupWatcher->start;

# start loop
Event::loop();
