#!./perl
BEGIN { push(@INC, qw(../../../lib ../../lib ../lib lib)) }
use Tk;

$top = tkinit;

# A callback can be a subroutine reference (or a subroutine name)
# and you can bind either to a whole widget class or a specific widget.
tkbind("Label", "<1>", \&sayhello);

tkpack Label::new($top, "-text" => "Hello world");
tkmainloop;

sub sayhello {
    print "Hello world\n";
}
