# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### use strict ; use Test ; use ExtUtils::MakeMaker ; BEGIN { my $oldfh = select STDERR ; my $ans = prompt("\nDo you wish to execute the interactive tests?", 'n') ; select $oldfh ; if ($ans !~ /^y/i){ plan( tests => 0, ) ; exit ; } else { plan ( tests => 1, ) ; } } ; use Event::SlidingWindow ; ######################### print STDERR <count_events() ; if ($n > 5){ print STDERR "Knock Out!!!\n" ; ok(1) ; exit ; } print STDERR "Hit me when you're ready (" ; # print STDERR "$n hits within the last 5 seconds" ; print STDERR join("-", @{$esw->_dump()}) ; print STDERR "): " ; ; $esw->record_event() ; }