sub SetCursor { my $w = shift; print STDERR "here we know that cursor position changed\n"; my $rc = $w->SUPER::SetCursor(@_); print STDERR "do something more when Text widget calmed down after changing cursor position\n"; return $rc; }