At work I code by the ton. At home I could for fun; experimenting with Tk and whatever other cool modules I might happen to stumble upon; to learn new things and tinker around with that which is cool (which would be just about anything PERL)

This time it is about as simple as it gets. Poking around the world of CPAN I found the module Tk::Clock. In a nutshell, this Tk module generates a digital clock face, analog clock face or both. I decided to assemble the script so that it generated a "BIG classic analog clock". The module allows for manipulation of the colors of the hands and tick marks. In addition, in this particular script, I have played around restricting resizing of the Tk GUI (I read about it in one of the major Perl Books). Anyway enough said. The code is posted below.

As always, any feedback is greatly appreciated! Enjoy!

Learning Is What Makes Life Interesting... And PerlMonks Is A Great Part Of Learning!

#!/usr/bin/perl -w use Tk; use Tk::Clock; my $MW=MainWindow->new(); ### --- Prevents Main Window Resizing $MW->bind('<Configure>' => sub{ my $xe = $MW->XEvent; $MW->maxsize($xe->w, $xe->h); $MW->minsize($xe->w, $xe->h); }); $MW->title("My Analog Clock"); $clock = $MW->Clock(); $clock->config( useDigital => 0, useAnalog => 1, anaScale => 880, handColor => 'Green4', secsColor => 'Red2', tickColor => 'Black', ); $clock->pack(); MainLoop();