#!/usr/local/bin/perl -w
BEGIN { unshift(@INC,'blib') }
use Tk;

use Tk::Pretty ; 

$top = MainWindow->new();

$menu = $top->Menu();

# $rubbish = 0;

$menu->checkbutton('-label' => 'Oil checked', '-variable' => \$rubbish);

($l1 = $top->Label("-textvariable" => \$rubbish))->pack;
($l2 = $top->Label("-textvariable" => $menu->entrycget(1,"-variable")))->pack;
($l2 = $top->Label("-textvariable" => ($menu->entryconfigure(1,"-variable"))[4]))->pack;
($l3 = $top->Label("-textvariable" => $l1->cget("-textvariable")))->pack;
($l3 = $top->Label("-textvariable" => ($l1->configure("-textvariable"))[4]))->pack;

$top->update;

print &pretty($menu->configure),"\n";

$menu->post($top->rootx,$top->rooty+$top->height);
$menu->focus();

Tk::MainLoop();
