Tk::StrfClock - a X/TK digital clock widget based on strftime.
use Tk::StrfClock; $top->StrfClock( -type => [Label|Button|Menubutton|Optionmenu], -format => <strftime format string>, -update => [<seconds>|s|m|h|d], -advance => [<seconds>], -action => <pattern matching action>, -ontick => <function>, );
Tk::StrfClock is a string clock widget based on one of a Tk::Label, a Tk::Button, a Tk::Menubutton or a Tk::Optionmenu (chosen at creation time). The current date and time (in some chosen configuration) is displayed as the text in the base widget.
All the base widget options are available.
Setthe base widget type at creation time. This cannot be configured thereafter. The default is Tk::Label.
Sets the required date/time format using POSIX strftime format. The default is "%c".
Sets how often the clock is updated. If set to the characters s, m, h, d or a then the clock is updated exactly on the second, minute, hour, day or is automatically guessed. The default is 'a'.
Sets the clock fast or slow this many seconds. The default is 0.
Sets a pattern matching action to be applied to the date string before it is displayed. The default is to do nothing.
Set a function to be run every tick of the clock. The default is none.
use Tk; use Tk::StrfClock; my $top=MainWindow->new(); $top->StrfClock()->pack(); MainLoop();
Run the module itself to start a test program. To increase the size of the fond add something like
*StrfClock*font: -*-fixed-medium-r-normal--20-*-*-*-*-*-*-*
to your .Xdefaults file.
To install Tk::Month, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::Month
CPAN shell
perl -MCPAN -e shell install Tk::Month
For more information on module installation, please visit the detailed CPAN module installation guide.