Tk::Splash - create a splash screen
BEGIN { require Tk::Splash; $splash = Tk::Splash->Show($image, $width, $height, $title, $overrideredirect); } ... use Tk; ... $splash->Destroy; MainLoop;
This module is another way to create a splash screen. It is slower than Tk::FastSplash, but tries to be compatible by using standard Tk methods for creation.
The splash screen is created with the Show function. Supplied arguments are: filename of the displayed image, width and height of the image and the string for the title bar. $width and $height may be left undefined. If $overrideredirect is set to a true value, then the splash screen will come without window manager decoration. If something goes wrong, then Show will silently ignore all errors and continue without a splash screen. The splash screen can be destroyed with the Destroy method, best short before calling MainLoop.
$image should be one of the core Perl/Tk image types (gif, ppm, bmp). For jpegs and pngs, a use Tk::JPEG or use Tk::PNG prior to the call of the Show method would be necessary.
use Tk::JPEG
use Tk::PNG
Show
Since displaying the splash screen is done during compile time (if put in a BEGIN block, like the SYNOPSIS example shows), the splash screen will also occur if the script is started using perl's -c (check) switch.
BEGIN
-c
Slaven Rezic <srezic@cpan.org>
Tk::FastSplash, Win32::GUI::SplashScreen.
To install Tk::Splash, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Tk::Splash
CPAN shell
perl -MCPAN -e shell install Tk::Splash
For more information on module installation, please visit the detailed CPAN module installation guide.