Perl/Tk saves your favourite tools

Main
back: TclTk vs Perl/Tk -1
next: References in Perl

  • There is also a class Dialog, but this is just meant as example.
  • Because of the OO structure, you have local names for objects, instead of the global object paths of Tcl.
  • we may also write
       $d = Toplevel $mw -class => 'Dialog';
       title $d 'example';
       ...
    
    This list-notation syntax of OO-Perl looks similar to the Tcl program, however list-notation does not provide stacking of calls. Your programs will be more verbose and need more variables in that notation.
  • Naming of components is not required, which saves you from looking for explanatory names for simple components in most cases.
  • MainWindow can be used in Perl/Tk on every spot where Tcl requires Toplevel: the MainWindow is a more flexible object. On UNIX you can have more than one under control in one program.

 
TclTk vs Perl/Tk -1 References in Perl

Created by Mark Overmeer with PPresenter on 11 juli 2001.