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

require "pad.pl";

$top = tkinit;

sub docommand {
    my($comm) = shift;
    $pad->append("> $comm");
    $answer = eval $comm;
    $pad->append($@ ? $@ : $answer);
}

tclcmd("option", "add", "*Font" => "lucidasanstypewriter-12");
$pad = Pad::new($top);
$pad->handler(\&docommand);
tkpack $pad;
focus $pad;
tkmainloop;