The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
#!/usr/bin/perl -w
########################################################################
# Copyright 2004 by Malcolm Nooning
# This program does not impose any
# licensing restrictions on files generated by their execution, in
# accordance with the 8th article of the Artistic License:
#
#    "Aggregation of this Package with a commercial distribution is
#    always permitted provided that the use of this Package is embedded;
#    that is, when no overt attempt is made to make this Package's
#    interfaces visible to the end user of the commercial distribution.
#    Such use shall not be construed as a distribution of this Package."
#
# Therefore, you are absolutely free to place any license on the resulting
# executable(s), as long as the packed 3rd-party libraries are also available
# under the Artistic License.
#
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
#
# See L<http://www.perl.com/perl/misc/Artistic.html>
#
#
#
########################################################################
our $VERSION = 0.02;

use POSIX qw (EXIT_SUCCESS EXIT_FAILURE);

use Tk;


#########################################################################
sub okay_response {
  my ($we_top) = @_;

  $we_top->destroy;
}

#########################################################################
sub say_hello {
  my $message = "hello";
  #.............................................
  my $okay_button;

  my $we_top = new MainWindow;
  $we_top->title("Hello");

  $we_top->Label
       (
          -text => $message . "\n",
          -justify => 'left',
       )->pack();

  #.....................................................................
  $okay_button = 
      $we_top->Button(  -text => 'Okay', 
                        -command => [  \&okay_response, 
                                       $we_top,
                                    ]
                      )->pack;
  #.....................................................................


  #########
  MainLoop;
  #########

}
#########################################################################
say_hello;