1 | #! perl |
1 | #! perl |
2 | |
2 | |
3 | # this creates a simple digital clock by overwriting the refresh hooks |
3 | =head1 NAME |
|
|
4 | |
|
|
5 | example-refresh-hooks - example of how to use refresh hooks |
|
|
6 | |
|
|
7 | =head1 DESCRIPTION |
|
|
8 | |
|
|
9 | Displays a very simple digital clock in the upper right corner of the |
|
|
10 | window. Illustrates overwriting the refresh callbacks to create your own |
|
|
11 | overlays or changes. |
|
|
12 | |
|
|
13 | =cut |
4 | |
14 | |
5 | sub on_init { |
15 | sub on_init { |
6 | my ($self) = @_; |
16 | my ($self) = @_; |
7 | |
17 | |
8 | # force a refresh every second |
18 | # force a refresh every second |