Parsing Command-Line Options

In the Unix world, it is standard practice to specify command-line options when you are invoking an application, especially a graphical program. Starting your program as myscript -geometry "80x40" would not be unusual. To have Perl/Tk parse and apply these command-line options for you automatically, just call CmdLine immediately after you create your MainWindow.

$mw->CmdLine;

For complete details, see Chapter 16.

Get Mastering Perl/Tk now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.