#!/usr/bin/perl -w use Test::Simple tests => 2; use Tk; my $mw = MainWindow->new; # create an object ok( defined $mw ); # check that we got something ok( $mw->isa('Tk') ); # and it's the right class $mw->Label(-text => 'Hello, world!')->pack; is($mw->text, 'Hello World!', text() ); $mw->Button( -text => 'Quit', -command => sub { exit }, )->pack; is($mw->text, 'Quit', text() ); is($mw->command, 'sub { exit }', text() );