#!./perl -w

use strict;

use Event qw(time);

my (%oops, @oops);
$oops{'test'}=1;
Event->var(var=>\@oops, cb=>sub {warn "Here we go.\n";}, poll=>'rw');

# install a timer that modifies variables randomly
Event->timer(interval=>1, repeat=>1, cb=>sub {
                                              # $oops{'test'}++;
                                              # delete $oops{'test'};
                                              push(@oops, 1);
                                              #$oops[0]=3;
	                                      warn "---> MODIFIED.\n"; 
	                                      # $_[0]->w->cancel;
                                             }
            );

# start loop
Event::loop();
