Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

sweetening tk with tk::sugar

0 views
Skip to first unread message

Jerome Quelin

unread,
Nov 18, 2009, 3:29:26 AM11/18/09
to
hi,

i'm sending this here in case you missed the announcement on
http://jquelin.blogspot.com/2009/11/sweetening-tk.html

if you're tired of tk's verbosity that makes you write things such as:

$widget->pack(
-side => 'top',
-expand => 1,
-fill => 'both',
-padx => 10,
-pady => 10,
);

you may appreciate tk::sugar that allows you to write instead:

use Tk::Sugar;
$widget->pack( top, xfill2, pad10 );

it's only syntaxic sugar, there's nothing magical underneath. but i think
this is quite a big win - ymmv though.

it supports more helper subs, check the documentation to see the full list.

enjoy,
jérôme
--
jqu...@gmail.com

0 new messages