home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / perl-faq / ptk-faq / part1 < prev    next >
Encoding:
Internet Message Format  |  1997-06-01  |  40.2 KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!csulb.edu!hammer.uoregon.edu!news-xfer.netaxs.com!news.maxwell.syr.edu!news.cis.ohio-state.edu!nntp.sei.cmu.edu!bb3.andrew.cmu.edu!goldenapple.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!lnsnews.lns.cornell.edu!lns62.lns.cornell.edu!PVHP
  2. From: pvhp@lns62.lns.cornell.edu (Peter Prymmer)
  3. Newsgroups: comp.lang.perl.tk,comp.lang.perl.announce,comp.answers,news.answers
  4. Subject: comp.lang.perl.tk FAQ part1 of 5
  5. Followup-To: comp.lang.perl.tk
  6. Date: Sun, 01 Jun 1997 06:38:24 GMT
  7. Organization: Wilson Lab, Cornell U., Ithaca, NY, 14853
  8. Lines: 989
  9. Approved: pvhp@lns62.lns.cornell.edu (Peter Prymmer)
  10. Expires: Thu, 31 Jul 1997 06:38:04 GMT
  11. Message-ID: <009B51BD.577B0320@lns62.lns.cornell.edu>
  12. Reply-To: PVHP@lns62.lns.cornell.edu
  13. NNTP-Posting-Host: lns62.lns.cornell.edu
  14. Xref: senator-bedfellow.mit.edu comp.lang.perl.tk:4655 comp.lang.perl.announce:639 comp.answers:26267 news.answers:103808
  15.  
  16. Summary: comp.lang.perl.tk Frequently Asked Questions.
  17. Archive-name: perl-faq/ptk-faq/part1
  18. Posting-Frequency: monthly
  19. Last-modified: Date: Sat May 31 16:48:37 1997
  20. URL: http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.html
  21. Version: 1.00_07
  22.  
  23. URL (Hypertext-split): http://w4.lns.cornell.edu/~pvhp/ptk/ptkTOC.html
  24. URL (Plaintext): http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.txt
  25. Image-supplement: http://w4.lns.cornell.edu/~pvhp/ptk/ptkIMG.html
  26. ftp-Archive: ftp://ftp.ccd.bnl.gov/pub/ptk/ptkFAQ.txt
  27. ftp-Archive: ftp://rtfm.mit.edu/pub/usenet/perl-faq/ptk-faq/
  28. e-mail-Archive: ptkfaq@pubweb.bnl.gov
  29.  
  30. Perl/Tk FAQ part 1 of 5 - Getting Started  
  31. ***************************************** 
  32.  
  33.  
  34.  
  35.  ______________________________________________________________________
  36.  
  37.  
  38.  
  39.  6. How do I build it? 
  40.  
  41.  In general, building perl/Tk requires: 
  42.  
  43.   1. A made & installed perl (requires a C language compiler). You may
  44.     need different versions of perl depending on which version of Tk you
  45.     wish to run. 
  46.   2. A C language compiler for the Tk code itself. 
  47.   3. A linkable Xlib (.o, .so, .a, etc.) for X-windows. 
  48.  
  49.  Perl/Tk has been successfully built using various vendors' cc compilers, as
  50.  well as with the free GNU gcc compiler. A make utility of some sort (make/
  51.  gmake) will be extremely helpful. 
  52.  
  53.  Step - by - step the commands to build the Tk extension to Perl are (for the
  54.  dynamically linked version) roughly as follows: 
  55.  
  56.   1. make install # the appropriate version of perl. 
  57.   2. uninstall # prior versions of the Tk extension to perl. 
  58.   3. gunzip -c Tk400.202.tar.gz | tar xvf - (options to tar
  59.     may vary esp. on SysV) 
  60.   4. cd Tk400.200 
  61.   5. read INSTALL 
  62.   6. perl Makefile.PL 
  63.   7. make 
  64.   8. make test 
  65.   9. make install 
  66.  
  67.  For the statically linked version you would `make tkperl` just after
  68.  executing the `make` step and before the `make test` step. 
  69.  
  70.  Note carefully that this process leaves behind a large amount of
  71.  documentation and examples in various sub-directories. You are strongly
  72.  encouraged to look carefully through your build tree for docs, examples, etc.
  73.  and keep those valuable files in a safe place. You might consider tar-ing them
  74.  off and installing in a webserver directory tree. 
  75.  
  76.  A relatively easy way to determine if the perl on your system allows for
  77.  dynamic linking was mentioned by Kenneth Albanowski
  78.  <kjahds@kjahds.com>. If the following does not say "dl_none.xs" then you
  79.  probably do have dynamically linked perl (or perhaps a very non-Unixy perl): 
  80.  
  81.      perl -e 'use Config; print $Config{dlsrc},"\n"'
  82.  
  83.  (thanks to Paul Lussier <plussier@isd.3com.com> for the correction!). 
  84.  
  85.  Here is a little more detailed discussion of each the steps just given: 
  86.  
  87.   o Install Perl Read the Tk files (Tk*/README, etc.) for info on which
  88.     version of perl is required for the perl/Tk kit you obtained.) For code
  89.     locations see a CPAN site (separate question in this FAQ), the actual
  90.     installation instructions come bundled in the perl***.tar.gz
  91.     distribution file. (Perl Configure & make troubles are beyond the
  92.     scope of this FAQ - please see the Perl FAQ itself or the INSTALL file
  93.     for more help with this critical step.)
  94.     You can install perl almost anywhere you like by specifying the 
  95.     -Dprefix=/path argument to sh Configure 
  96.   o Unpack perl/Tk outside the Perl distribution
  97.     (i.e. outside the perl build, perl install, or perl lib areas).
  98.     gunzip Tk400.202.tar.gz
  99.     tar -xvf Tk400.202.tar
  100.     (Your tar program may not take -xvf. The resultant Tk400.202/
  101.     area will be referred to as your ``Tk build'' directory throughout this
  102.     document.)
  103.   o Read INSTALL carefully
  104.     cd Tk400.202
  105.     pager INSTALL
  106.     where pager is the program you use to scroll through text files more
  107.     or less. Be sure to read it and don't just pound away on the spacebar. 
  108.   o If necessary remove any previously installed version of perl/Tk
  109.     If you had a previously working version of Tk installed, you may need
  110.     to resurrect the Makefile for it and execute:
  111.     make uninstall
  112.     make realclean
  113.     before you unpack the new version. (The uninstall target of
  114.     MakeMaker is relatively new so please be careful here.)
  115.   o Have perl generate a custom Makefile.
  116.     perl Makefile.PL
  117.     (see below for more on this step.)
  118.   o Compile.
  119.     make
  120.     (if and only if building static: make tkperl
  121.   o Test.
  122.     make test
  123.   o Install.
  124.     make install 
  125.   o Play with it.
  126.     basic_demo
  127.     (modify #! line if necessary, or specify /path/to/perl
  128.     ./basic_demo)
  129.     (warning if you build Tk-b9.01 with perl5.002gamma then change the
  130.     line in basic_demo from
  131.     use lib ./blib;
  132.     to
  133.     use lib qw(blib/arch blib/lib);) 
  134.   o Save the documentation and examples in a safe accessible place.
  135.     use tar, cp, mv, chmod or whatever you prefer to save the valuable
  136.     ancillary files from your Tk build tree.
  137.  
  138.  On the perl Makefile.PL step it may be necessary to give explicit
  139.  locations of the required X11 libraries and/or include headers. For example: 
  140.  
  141.      perl Makefile.PL X11=/usr/local/X11R5
  142.  
  143.  or perhaps different directory tree specification is necessary with your X
  144.  installation: 
  145.  
  146.      perl Makefile.PL X11INC=/usr/local/share/X11R5/include \
  147.                       X11LIB=/usr/local/arch/X11R5/lib
  148.  
  149.  There are system and site dependencies in all of the above steps. However, the
  150.  largest single source of build trouble comes from not using the latest versions
  151.  of the various utilities (C compiler, make, etc.). In particular ensure that
  152.  when you say perl Makefile.PL that the perl that gets invoked is up to
  153.  date - use which perl (or whence perl) and perl -v to determine this.
  154.  If necessary specify the full path name to your perl5 interpreter/compiler.
  155.  (Some people do not rm their older perl interpreters when upgrading to a more
  156.  recent version - beware.) 
  157.  
  158.  If you still run into trouble take a look at the INSTALL, the README and the 
  159.  README file for your specific system (e.g. README.AIX, README.OSF, etc.).
  160.  You might also find your system mentioned in the ptk hyper-mail archive at: 
  161.  
  162.      http://www.rosat.mpe-garching.mpg.de/mailing-lists/ptk/
  163.  or
  164.      http://pubweb.bnl.gov/~ptk/
  165.  or
  166.      ftp://ftp.ccd.bnl.gov/pub/ptk/archives/
  167.  
  168.  or the Perl 5 Porters page at one of the following URLs: 
  169.  
  170.      http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/
  171.      http://www.hut.fi/~jhi/perl5-porters.html
  172.  
  173.  If you wish to discuss your Tk build problems with others run and save the
  174.  output from the myConfig script in the Tk build directory (the output may
  175.  already be in the myConfig.out file from your perl/Tk build directory), as
  176.  well as the myconfig script in your perl build directory (or the output of perl
  177.  -V with a capitol V). It is often helpful to include the output of either (or both)
  178.  of these scripts in your discussion. 
  179.  
  180.  Presented here are the beginnings of a list of problems associated with
  181.  building perl/Tk on various platforms (for help building perl itself please refer
  182.  to the Perl FAQ). This list is in no way complete nor authoritative (nor is it
  183.  necessarily even up-to-date!) but simply lists problems people have reported.
  184.  Keep in mind that your installation may differ (e.g. location differences such
  185.  as /usr/bin/perl vs. /usr/local/bin/perl) even if its the same
  186.  platform listed here: 
  187.  
  188.  A Sampling of Perl/Tk Platforms:
  189.  ++++++++++++++++++++++++++++++++
  190.  
  191.  AIX:
  192.     As of perl5.002b & Tk-b9.01 README.AIX says no patching is
  193.     necessary. 
  194.  
  195.     For Tk-b8: modifying the perl.exp file may be necessary. There is a
  196.     patch in Tk-b8/README.AIX. It may be necessary to make
  197.     regen_headers after the patch. 
  198.  FreeBSD:
  199.     Nate Patwardhan <nvp@nfic.com> reports no trouble at all with
  200.     Tk400.200 on FreeBSD-2.1.5 or FreeBSD-2.2.1. 
  201.  HPUX:
  202.     For Tk-b11: One person reports a need to add #define
  203.     TIMEOFDAY_TZ to the tkConfig.h header file in order to compile on
  204.     HPUX 9.05. 
  205.  
  206.     Previous versions: Most people seem to prefer the dynamic linking
  207.     afforded by a recent version of the gcc compiler on this system. 
  208.  Linux:
  209.     John C. Wingenbach indicates that should you encounter an error
  210.     message like Cannot find -lX11 anywhere at ./myConfig
  211.     line 184 when running your perl Makefile.PL (under Slakware
  212.     3.0) that you should be more specific about -l/path/to/libX11.a.
  213.     Adam Wasserman <awasser@hermes.sgc.com> has graciously
  214.     provided a compilation of Linux compilation trials & tribulations. It is
  215.     an (as yet un-edited) document available at: 
  216.     http://w4.lns.cornell.edu/~pvhp/ptk/hints/linux_compile.txt
  217.  MachTen:
  218.     Mark Pease <pease@act.sps.mot.com> mentions that:
  219.     I was able to get Tk-b11.02 running under MachTen 2.2 perl5.002_01.
  220.     I did need to make one change to get a round a MachTen problem. In
  221.     pTk/tclUnix.h, pwd.h is included, but it is also included in pTk/tkPort.h
  222.     (which is included in Lang.h, which is use by tclUnixUtil.c, whew!) 
  223.  
  224.     MachTen's pwd.h can't be included more that once or you get an
  225.     error. 
  226.  
  227.     It looked to me like tclUnix.h was only used in tclUnixUtil.c, so I
  228.     commented out the #include <pwd.h> in tclUnix.h. 
  229.  NetBSD:
  230.     Jesus M. Gonzalez <jgb@gsyc.inf.uc3m.es> mentions success with:
  231.     Tk-b11.01 compiles, installs and runs just out of the box in
  232.     NetBSD-1.1/i386. I just followed the INSTALL instructions. 
  233.  NeXTSTEP:
  234.     Gerd Knops recently posted a discussion of the steps to get perl
  235.     running on several NeXTSTEPs to p5p.
  236.  OS/2:
  237.     Ilya Zakharevich <ilya@math.ohio-state.edu> has compiled a
  238.     modified form of Tk-b11.02 to work with the Xfree86 client/server
  239.     package, as well more advanced versions working with the Open32 PM
  240.     package.
  241.  OSF/1:
  242.     As of perl5.002b & Tk-b9.01 you will probably be able to follow the
  243.     usual instructions. John Stoffel <john@wpi.edu> reports that if you
  244.     use gcc (rather than cc) you should use at least version 2.7.2 
  245.  
  246.     For Tk-b8: make is reputedly not up to the task on this system. 
  247.     Tk-b8/README.OSF recommends gmake instead.
  248.     Stephane Bortzmeyer <bortzmeyer@pasteur.fr> reports a successful
  249.     build with Perl 5.001m, xsubpp 1.922, MakeMaker 4.23. He points
  250.     out that it was necessary for him to upgrade the xsubpp and
  251.     MakeMaker that he received with his copy of Perl5.001m. 
  252.  SCO:
  253.     For Tk-b8: Eric J. Bohm <bohm@cs.Buffalo.EDU> reported a need to
  254.     comment out line(s) from myConfig and GNUMakefiles using GNU
  255.     make 3.67. (See Tk-b8/README.SCO for specifics.) 
  256.  SGI (Irix):
  257.     For Tk-b11.02: Phillip Moore <wpm@morgan.com> reports a clean
  258.     build on IRIX 5.3. 
  259.  
  260.     Matthew Black <black@csulb.edu> recently mentioned a need to apply
  261.     "patchSG0000596" to get perl sockets to work. His message was
  262.     copyrighted and is not included here. Send e-mail to him to find out
  263.     where the get "patchSG0000596". 
  264.  Suns:
  265.     SunOS (BSD):
  266.     For Tk-b10 on SunOS 4.1.3_U1
  267.     using SparcWorks acc 3.0.1 Frederick L. Wagner <derf@ti.com>
  268.     reports needing to use the perl malloc rather than the system malloc()
  269.     when building perl.
  270.     For Tk-b8: Tom Tignor <tpt2@BBN.COM> reports the following on
  271.     SunOS (sun4m sparc): Tue, 28 Nov 1995 13:19:42
  272.     In trying to make, I got a "write: argument mismatch" error for the file
  273.     ptK/Lang.h. I looked at the file and found the offending function,
  274.     Tcl_GetOpenFile, which has a third argument called "doWrite" (not
  275.     "write") in tkGlue.c. I changed the argument from "write" to "doWrite"
  276.     in Lang.h and it's compiling fine (for the moment. :) 
  277.     Solaris (System V):
  278.     For Tk-b8: There is trouble getting perl to use Socket routines (i.e.
  279.     trouble with make perl itself not necessarily trouble with Tk-b8). See
  280.     the perl FAQ for more info or the .shar file that Tom Christiansen
  281.     occasionally posts to comp.lang.perl.misc. Further information on perl 
  282.     inter process communication can be found in the perlipc* files at: 
  283.     ftp://ftp.perl.com/perl/info/everything_to_know/. 
  284.  SVR4:
  285.     For Tk-b8: Martha G. Armour and Len Reed report on two separate
  286.     hardware platforms running SVR4 - extensive details in 
  287.     Tk-b8/README.SVR4. Interestingly, they report no trouble at all on
  288.     Linux. 
  289.  Ultrix:
  290.     Peter Prymmer reports that with Tk-b11 it was necessary to change
  291.     the line in Makefile.PL that reads:
  292.     'LIBS' => ["$xlib -lX11 -lpt -lsocket -lnsl -lm"],
  293.     to read:
  294.     'LIBS' => ["$xlib -lX11 -lpt -lsocket -lnsl -lm
  295.     -ldnet"],
  296.     because of a newer X11 in /usr/local that needed the DECnet protocol
  297.     linking. 
  298.  
  299.     John Stoffel reports a successful build of static Tk-b10 on Ultrix 4.5. 
  300.  Windows NT:
  301.     Nick Ing-Simmons reports success with the alpha Tk404.000 kit,
  302.     perl5.004, and Visual C++. 
  303.  
  304.  non-Unix(ish)es:
  305.  ++++++++++++++++
  306.  
  307.  Information on non-Unix(ish) perl platforms may be obtained from
  308.  newsgroups and email lists as well as a few world wide web sites. For example,
  309.  try the Perl 5 Porters (p5p) [page|archives] at one of: 
  310.  
  311.      http://www.rosat.mpe-garching.mpg.de/mailing-lists/Perl5-Porters/
  312.      http://www.hut.fi/~jhi/perl5-porters.html
  313.  
  314.  In general your non-Unix platform must be able to support perl 5 and Xlib (a
  315.  C compiler and a make utility are tremendously useful too). If you want to run
  316.  perl/Tk on another computer and simply have the display show up on yours
  317.  then all you need on your computer is an "X server" The long list of UNIX and
  318.  non-unix perl 5 ports, Tcl/Tk ports, and Perl/Tk ports that used to appear in
  319.  this FAQ has now moved to a separate web page at: 
  320.  
  321.      http://w4.lns.cornell.edu/~pvhp/ptk/ptkPORT.html
  322.  
  323.  ______________________________________________________________________
  324.  
  325.  
  326.  
  327.  7. Where is the Documentation? 
  328.  
  329.  A great deal of Perl/Tk documentation gets installed as part of the Tk
  330.  extension building process. Hence, a great deal of documentation is probably
  331.  residing on your computer already. 
  332.  
  333.  More documentation is "in the works": there are several books dealing with
  334.  perl/Tk in progress, an ongoing magazine column and a growing FAQ (the
  335.  document you are presently reading). 
  336.  
  337.  The additional material you may want to look at can be split into Perl/Tk, Perl,
  338.  Tcl/Tk, and X documentation categories: 
  339.  
  340.  Perl/Tk Specific Documentation
  341.  ++++++++++++++++++++++++++++++
  342.  
  343.  The man pages
  344.  -------------
  345.  
  346.  With up to date Tk build kits the various perl/Tk pod documents are converted
  347.  to your systems' helpfile format and installed as part of the perl/Tk "make
  348.  install" process. If you have a recent verion of perl/Tk try something like 
  349.  man 3 Tk::Tk if this does not work check with you system administrator for
  350.  the proper MANPATH. 
  351.  
  352.  In your Tk build directory there should be a doc/ sub-directory in which
  353.  there are a number of .htm files (after you make install). These files were
  354.  originally Tcl/Tk man pages (from the man* sub-directories), but the *.htm
  355.  files have been converted to Perl syntax and rendered in HTML format. You
  356.  can use the Perl/Tk web browser to view them locally with a command like: 
  357.  
  358.      tkweb index.html
  359.  
  360.  or you may view them on the web itself by installing them in a web-server
  361.  directory tree, or by pointing a browser at: 
  362.  
  363.      http://w4.lns.cornell.edu/~pvhp/ptk/doc/
  364.  
  365.  The newsgroup
  366.  -------------
  367.  
  368.  The newsgroup name is comp.lang.perl.tk and this FAQ will be periodically
  369.  posted to that group (as well as a few other newsgroups). The newsgroup
  370.  and/or the ptk mailing list are the appropriate places to post questions - yes
  371.  even simple ones! (Although answers may sometimes be long in coming ... :-( 
  372.  
  373.  The nTk/pTk mailing list
  374.  ------------------------
  375.  
  376.  The mailing list is an excellent supplement and complement to the newsgroup 
  377.  comp.lang.perl.tk. All messages mailed to the list are forwarded to the
  378.  newsgroup. (But not all messages posted to the newsgroup are forwarded to
  379.  the list.) Some Perl/Tk experts only have access to e-mail. 
  380.  
  381.  The nTk/pTk Mailing List Archive is a very useful source of information too,
  382.  and is accesible at either 
  383.  
  384.      http://pubweb.bnl.gov/~ptk/
  385.  
  386.  or via ftp at 
  387.  
  388.      ftp://ftp.ccd.bnl.gov/pub/ptk/archives/
  389.  
  390.  (both in the USA). You may search the contents of another ptk mailing list
  391.  hypertext archive thanks to a cgi-bin script written by Achim Bohnet in
  392.  Germany at: 
  393.  
  394.      http://www.rosat.mpe-garching.mpg.de/mailing-lists/ptk/
  395.  
  396.  You must subscribe to the mailing list to receive e-mail from the list. To
  397.  subscribe to the mailing list you can send mail to 
  398.  majordomo@lists.stanford.edu (i.e. <majordomo@lists.stanford.edu>) with
  399.  the following command in the body of your e-mail message: 
  400.  
  401.      subscribe ptk joe.user@somewhere (Joe D. User)
  402.  
  403.  To send a message to all recipients of the mailing list send e-mail to 
  404.  <ptk@lists.stanford.edu>. 
  405.  
  406.  To remove yourself from the mailing list send e-mail to 
  407.  majordomo@lists.stanford.edu (i.e. <majordomo@lists.stanford.edu>) with
  408.  the following command in the body of your e-mail message: 
  409.  
  410.      unsubscribe ptk joe.user@somewhere (Joe D. User)
  411.  
  412.  Where instead of "joe.user@somewhere" you might very well like to
  413.  substitute another string of characters. 
  414.  
  415.  (Please note: one does not send unsubscribe messages to the ptk list. One does
  416.  send "unsubscribe ptk" messages to a special e-mail list administration
  417.  program. In the case of the ptk list you send to majordomo@lists.stanford.edu.
  418.  You must of course do this from the account and computer from which you
  419.  initially subscribed. In particular if you are viewing the hypertext version of
  420.  this FAQ you may not be able to unsubscribe from 
  421.  majordomo@lists.stanford.edu by following the mailto: hyperlinks - if your
  422.  web-browser account/computer is different from your subscribe to
  423.  e-mail-lists account/computer (the details of this might depend on which
  424.  browser you use though). Thank you for your cooperation on this.) 
  425.  
  426.  The demo programs
  427.  -----------------
  428.  
  429.  Examine (and try running) the code in your Tk#/ build directory tree. You
  430.  might also be interested in test-running the code that gets installed: 
  431.  
  432.   o or perl5/site_perl/Tk/demos/ or 
  433.     perl5/site_perl/Tk/demos/widget_lib/ directories (recent
  434.     Tk's). 
  435.   o Tk#/ or perl5/Tk/demos/ or perl5/Tk/demos/widget_lib/
  436.     directories (older versions e.g. Tk-b8). 
  437.  
  438.  In order to determine where on your system the perl5/ directory is located
  439.  type the following one-line perl command (at your shell prompt - this is not a
  440.  line from a perl script): 
  441.  
  442.      perl -e 'print join("\n",@INC,"");'
  443.  
  444.  If that command does not turn up a perl5/ directory then make sure that you
  445.  are running perl 5 with the following: perl -v (this too can simply be
  446.  entered at the shell prompt). 
  447.  
  448.  More on the pod & man documentation
  449.  -----------------------------------
  450.  
  451.  [As previously mentioned a great number of Tcl/Tk man pages are converted
  452.  from *roff format to html format and are to be found within your Tk build
  453.  directory tree in the doc/ sub-directory. These documents form an
  454.  authoritative and extensive reference set for Perl/Tk.] 
  455.  
  456.  The raw pod files that come with the Tk kit are examples of the perl "plain old
  457.  documentation" format and are just about human readable as they are (e.g. you
  458.  may more, cat, or less them; or send them to a printer). Many (not all) of
  459.  the perl/Tk pod documents get are converted to *roff format and are installed
  460.  in you perl man page area as part of the perl/Tk build process. 
  461.  
  462.  If you have a recent version of perl/Tk try something like man 3 Tk::Tk. If
  463.  this does not work check your manual page path with 
  464.  
  465.      perl -MConfig -e 'print $Config{man1dir},"\n",$Config{man3dir},"\n"'
  466.  
  467.  And if you still cannot find the manual pages check with your system
  468.  administrator for the proper MANPATH and/or Tk installation version. 
  469.  
  470.  "Raw" .pod (such as UserGuide.pod) can be viewed with the tkpod
  471.  hypertext pod viewer. Raw .pod may also be run through any one or more of a
  472.  large numbers of re-formatting perl filters. Such programs include pod2man, 
  473.  pod2text, pod2html, pod2latex, etc. (these get installed when you install 
  474.  perl). Other translators pod2texinfo, pod2fm, pod2pdf, etc., also exist.
  475.  Check a CPAN site for these scripts if you do not already have them. 
  476.  
  477.  A command line like the following (but subject to local variations) should
  478.  work for you: 
  479.  
  480.      tkpod site_perl/Tk/UserGuide.pod
  481.  
  482.  or if you like Unix manual page style: 
  483.  
  484.      pod2man perl5/Tk/UserGuide.pod | nroff -man | more
  485.  
  486.  (note that I am showing examples with almost full file path names - the
  487.  alternative would be to cd into the appropriate directory then type: 
  488.  
  489.      pod2man UserGuide.pod | nroff -man | more
  490.  
  491.  There should even be a perl script to run that above command for you. It is
  492.  executed as: 
  493.  
  494.      perldoc UserGuide
  495.  
  496.  Note that if there is pod like documentation in a perl module you may also
  497.  execute tkpod (or perldoc) on it as in: 
  498.  
  499.      tkpod ColorEditor.pm
  500.  
  501.  (please note that unfortunately, not all .pm mod files have pod embedded.) 
  502.  
  503.  If you have misplaced your tkpod program but still want that GUI look and
  504.  feel (like xman) make the appropriate changes to the following script: 
  505.  
  506.      #!/usr/bin/perl
  507.      use Tk;
  508.      use Tk::Pod;
  509.      my $m = new MainWindow;
  510.      $m -> Pod(-file => 'ColorEditor.pm');
  511.      # or use command line path/filename:
  512.      # $m -> Pod(-file => $ARGV[0]);
  513.      MainLoop;
  514.  
  515.  A miscellany of internet perl/Tk resources includes:
  516.  ----------------------------------------------------
  517.  
  518.  World Wide Web - perl/Tk man pages
  519.      http://pubweb.bnl.gov/~ptk/doc/index.html
  520.      http://w4.lns.cornell.edu/~pvhp/ptk/doc/
  521.      http://w4.lns.cornell.edu/~pvhp/ptk/pod/
  522.  The Perl/Tk Newsgroup
  523.      comp.lang.perl.tk
  524.  Perl Newsgroups
  525.      comp.lang.perl.misc
  526.      comp.lang.perl.anounce
  527.      comp.lang.perl.modules
  528.  Tcl Newsgroups
  529.      comp.lang.tcl
  530.      comp.lang.tcl.announce
  531.  Miscellaneous Newsgroups
  532.      comp.answers
  533.      news.answers
  534.  Perl/Tk FAQ-Archives (ftp sites) [Note: FAQ may be many separate files]
  535.   (see also CPAN sites)
  536.      ftp://rtfm.mit.edu/pub/usenet/comp.lang.perl.tk
  537.      ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/lang/perl/tk
  538.      ftp://ftp.uu.net/usenet/news.answers/perl-faq/ptk-faq
  539.      ftp://ftp.ccd.bnl.gov/pub/ptk/                   130.199.54.188
  540.      ftp://ftp.ccd.bnl.gov/pub/ptk/ptkFAQ.txt         130.199.54.188
  541.      ftp://ftp.wpi.edu/perl5/pTk-FAQ                  130.215.24.209
  542.      ftp://perl.com/pub/perl/doc/ptkFAQ.gz            199.45.129.30
  543.      ftp://perl.com/pub/perl/doc/ptkFAQ.ps.gz         199.45.129.30
  544.  WWW-FAQ for perl/Tk
  545.      http://w4.lns.cornell.edu/~pvhp/ptk/ptkTOC.html
  546.      http://w4.lns.cornell.edu/~pvhp/ptk/ptkFAQ.html
  547.  World Wide Web - perl/Tk info sites
  548.      http://pubweb.bnl.gov/~ptk/
  549.      http://fxfx.com/kgr/compound/ (Perl Tk Compound Widget Page)
  550.      http://w4.lns.cornell.edu/~pvhp/ptk/ptkIMG.html (FAQ image supplement)
  551.      http://w4.lns.cornell.edu/~pvhp/ptk/etc/
  552.      http://w4.lns.cornell.edu/~pvhp/ptk/misc/
  553.      http://w4.lns.cornell.edu/~pvhp/ptk/PNMTYAK/
  554.      http://www.mirai.com/wks/
  555.  The Mailing list
  556.      majordomo@lists.stanford.edu 
  557.      ptk@lists.stanford.edu 
  558.  
  559.  Perl Specific Documentation
  560.  +++++++++++++++++++++++++++
  561.  
  562.  There are a growing number Perl books available. A more complete
  563.  Perl-bibliographic discussion than that given here is available in the Perl
  564.  FAQ or at: 
  565.  
  566.      http://www.perl.com/perl/info/books.html
  567.  
  568.  For Perl 5 there is (as of September 1996) a "New Camel" by Larry Wall, Tom
  569.  Christiansen, and Randal L. Schwartz, with Stephen Potter. 
  570.  
  571.   Programming Perl 2nd Edition
  572.   Larry Wall, Tom Christiansen, & Randal L. Schwartz with Stephen
  573.   Potter 
  574.   (c) 1996 O'Reilly & Associates Inc.
  575.   ISBN 1-56592-149-6 (English)
  576.  
  577.  A second edition of the Llama is due out soon too: 
  578.  
  579.   Learning Perl, 2ndEdition
  580.   Randal L. Schwartz
  581.   June 1997 (est.) O'Reilly & Associates Inc.
  582.   ISBN 1-56592-284-0 (English)
  583.  
  584.  The two early Perl books by Schwartz and Wall are very helpful (even if they
  585.  do pertain to perl 4 and not 5. Beware that perl/Tk makes extensive use of perl
  586.  5 object-oriented features.): 
  587.  
  588.   Learning Perl (The Llama)
  589.   Randal L. Schwartz
  590.   Copyright (c) 1993 O'Reilly & Associates Inc.
  591.   ISBN 1-56592-042-2 (English)
  592.   ISBN 2-84177-005-2 (French)
  593.   ISBN 3-930673-08-8 (German)
  594.   ISBN 4-89502-678-1 (Japanese)
  595.  
  596.   Programming Perl (The Camel)
  597.   Larry Wall and Randal L. Schwartz
  598.   Copyright (c) 1991 O'Reilly & Associates Inc.
  599.   ISBN 0-937175-64-1 (English)
  600.   ISBN 3-446-17257-2 (German) (Programmieren in Perl, translator:
  601.   Hanser Verlag)
  602.   ISBN 4-89052-384-7 (Japanese)
  603.  
  604.  There is also some Perl5 (book material) information at: 
  605.  
  606.      http://www.metronet.com/1h/perlinfo/perl5/
  607.  
  608.  Jon Orwant (the organizer of the comp.lang.perl.tk newgroup) has a book on
  609.  Perl 5 that has a chapter that discusses the Tk extension. (Please note that it is
  610.  mostly about Perl 5, there is a some discussion of four simple Perl/Tk
  611.  programs, but it is not a book wholly devoted to Perl/Tk.) It is nevertheless a
  612.  good introduction to object-oriented Perl 5 programming. The relevant info: 
  613.  
  614.   Perl 5 Interactive Course
  615.   Jon Orwant
  616.   (c) 1996 The Waite Group Press
  617.   A Division of SAMS Publishing, Corte Madera, CA USA
  618.   ISBN: 1-57169-064-6
  619.  
  620.  The Perl 5 Quick Reference Guide (may require LaTeX for installation) can
  621.  be obtained from any CPAN ftp site. Detailed location information is also
  622.  available at the author's website: 
  623.  
  624.      http://www.xs4all.nl/~jvromans/perlref.html
  625.  
  626.  The quick reference guide has also been turned into a small Nutshell
  627.  handbook: 
  628.  
  629.   Perl 5 Desktop Reference
  630.   Johan Vromans
  631.   Copyright (c) February 1996 O'Reilly & Associates Inc.
  632.   ISBN: 1-56592-187-9; Order number: 1879
  633.  
  634.  Eric F. Johnson has a book that discusses many perl5 for Unix vs. perl5 for
  635.  Windows NT issues. He includes a final chapter with extensive discussion of
  636.  the Tk extension and the ->Text() widget in particular. The information on
  637.  that book is: 
  638.  
  639.   Cross-Platform Perl
  640.   (c) 1996 Eric F. Johnson
  641.   MIS:Press/M&T Books
  642.   ISBN: 1-55851-483-X
  643.  
  644.  Kamran Husain and Robert F. Breedlove have written a perl 5 book that
  645.  includes a chapter on Tk with some discussion of Menu()s. That book is: 
  646.  
  647.   Perl 5 Unleashed
  648.   Kamran Husain and Robert F. Breedlove
  649.   (c) 1996 Sams Publishing, Indianapolis, IN
  650.   ISBN: 0-672-30891-6
  651.  
  652.  There is also a "Perl 5 How-To" book available that contains a great deal of
  653.  erroneous information about perl/Tk. Among other things that book wrongly
  654.  mentions that it is necessary to have a complete Tcl/Tk library installed on
  655.  one's system to compile the Tk extension to perl. (They are incorrect - it is
  656.  only necessary to have the appropriate perl version, libc and Xlib, the Tk
  657.  extension is otherwise "self-contained"). 
  658.  
  659.  There is also a book on perl web client. It features a a chapter on perl/Tk that
  660.  was written by Nancy Walsh: 
  661.  
  662.   Web Client Programming with Perl
  663.   Clinton Wong
  664.   1st Edition March 1997
  665.   O'Reilly & Associates Inc.
  666.   ISBN: 1-56592-214-X; Order number: 214X
  667.  
  668.  Additional book information may be found at Tom Christiansen's perl & cgi
  669.  books page, or at his Perl-related Book Reviews page. 
  670.  
  671.  The multi-part perl 5 manual pages are available (assuming they have been
  672.  installed in your MANPATH, type man perl, man perlmod etc.). 
  673.  
  674.  The perl 5 man pages are also available on the web at a number of locations. In
  675.  general the more recent the documentation the more helpful it is. 
  676.  
  677.  In addition to the CPAN ftp source sites, a miscellany of internet perl
  678.  resources includes: 
  679.  
  680.  Newsgroups
  681.      comp.lang.perl.misc
  682.      comp.lang.perl.announce
  683.      comp.lang.perl.modules
  684.      comp.infosystems.www.authoring.cgi
  685.      comp.answers
  686.      news.answers
  687.  Perl FAQ-Archives (ftp sites) [Note: FAQ may be many separate files]
  688.  (as of 5.004 the FAQ ships in pod format with perl)
  689.      (see also the CPAN sites)
  690.    North America
  691.      ftp://rtfm.mit.edu/pub/usenet/news.answers/perl-faq/
  692.      ftp://ftp.uu.net/usenet/news.answers/perl-faq  192.48.96.9
  693.      ftp://ftp.khoros.unm.edu/pub/perl/faq.gz       198.59.155.28
  694.    Europe 
  695.      ftp://ftp.cs.ruu.nl/pub/NEWS.ANSWERS/perl-faq/ 131.211.80.17
  696.      ftp://src.doc.ic.ac.uk/packages/perl/FAQ       146.169.2.10
  697.  Gopher Perl FAQ 
  698.      gopher://gopher.metronet.com/11/perlinfo/faq
  699.  WWW-FAQ for Perl
  700.      http://www.perl.com/perl/faq/
  701.      http://www.smartpages.com/bngfaqs/comp/lang/perl/top.html
  702.      http://www.smartpages.com/bngfaqs/comp/lang/perl/misc/top.html
  703.      http://www.smartpages.com/bngfaqs/comp/lang/perl/announce/top.html
  704.      http://www.cis.ohio-state.edu/hypertext/faq/usenet/perl-faq/top.html
  705.  Perl for Win32 FAQ  (discusses Win95)
  706.      http://www.perl.org/CPAN/doc/FAQs/win32/Perl_for_Win32_FAQ.html
  707.  
  708.  Perl info sites
  709.  Gopher (gopher:70) perl info sites
  710.    USA
  711.      gopher://gopher.metronet.com/11h/perlinfo
  712.  World Wide Web (http:80) perl info sites
  713.    USA
  714.      http://www.yahoo.com/Computers_and_Internet/Languages/Perl/index.html
  715.      http://www.perl.com/
  716.      http://www.khoros.unm.edu/staff/neilb/perl/home.html
  717.      http://www.khoros.unm.edu:80/staff/neilb/perl/metaFAQ/
  718.      http://www.metronet.com/perlinfo/
  719.      http://www.metronet.com/perlinfo/perl5.html (Perl 5)
  720.      http://www.eecs.nwu.edu/perl/perl.html
  721.      http://cesr39.lns.cornell.edu/public/perl/
  722.      http://www.virtualschool.edu/mon/Perl.html
  723.      http://www.hermetica.com/technologia/unexec/
  724.      http://www.oac.uci.edu/indiv/ehood/perlWWW/
  725.      http://web.sau.edu/~mkruse/www/scripts/
  726.      http://orwant.www.media.mit.edu/the_perl_journal/
  727.      http://www.perl.com/Architext/AT-allperl.html
  728.      http://www.mispress.com/introcgi/
  729.      http://www.walrus.com/~smithj/webcan/
  730.      http://web.syr.edu/~chsiao05/cps600_project.html
  731.      http://www.iftech.com/classes/webdev/webdev_perl.htm
  732.      http://www.cc.iastate.edu/perlmenu/
  733.      http://www.ora.com/www/item/cgi_prog.html
  734.    UK
  735.      http://pubweb.nexor.co.uk/public/perl/perl.html
  736.      http://www.bio.cam.ac.uk/web/form.html
  737.  Web references to Perl mailing lists
  738.      http://www.perl.com/perl/info/mailing-lists.html
  739.      http://www.nicoh.com/cgi-bin/lwgate/PERL5-PORTERS/
  740.      http://www.hut.fi/~jhi/perl5-porters.html
  741.      http://www.rosat.mpe-garching.mpg.de/mailing-lists/
  742.  
  743.  Tcl/Tk Specific Documentation
  744.  +++++++++++++++++++++++++++++
  745.  
  746.  The two Tcl/Tk books by Ousterhout and Welch are very good starting points
  747.  (you must however, translate the tcl-isms to perl in the sample scripts): 
  748.  
  749.   Tcl and the Tk Toolkit
  750.   John K. Ousterhout
  751.   Copyright (c) 1994 Addison-Wesley Publishing Company
  752.   ISBN 0-201-63337-X (alk. paper)
  753.   LOC QA76.73.T44097 1994; 005.13'3--dc20
  754.  
  755.   Practical Programming in Tcl and Tk
  756.   Brent Welch
  757.   Copyright (c) 1995 Prentice Hall
  758.   ISBN 0-13-182007-9 
  759.  
  760.  Within the tclsh or wish shells your manpath includes the tcl/tk man pages
  761.  (which may not be in your login MANPATH). Thus from the % prompt within
  762.  either shell type commands like: 
  763.  
  764.      % man -k Tk
  765.  
  766.  The Tcl/Tk Reference Guide is also a source of useful information. Although
  767.  it's Tcl specific most perl/Tk commands can be, more or less, easily derived
  768.  from it. [Note that in perl/Tk the names of some functions and some
  769.  configuration options have changed slightly from their Tcl/Tk counterparts.
  770.  With recent versions of perl/Tk a great many functions start with an upper
  771.  case letter and continue with all lower case letters (e.g. there is a perl/Tk 
  772.  Entry widget but no entry widget), and many configuration options are all
  773.  lower case (e.g. there is a perl/Tk highlightthickness option but no 
  774.  highlightThickness option).] You may fetch the Tcl/Tk Reference Guide
  775.  (may require LaTeX for installation) from: 
  776.  
  777.    ftp://ftp.slac.stanford.edu/software/TkMail/tkref-4.0.1.tar.gz 134.79.18.30
  778.    ftp://ftp.aud.alcatel.com/tcl/docs/tkref-4.0.1.tar.gz          198.64.191.10
  779.  
  780.  There are a number of other Tcl/Tk resources on the internet including: 
  781.  
  782.  Newsgroups
  783.      comp.lang.tcl
  784.      comp.lang.tcl.announce
  785.      comp.infosystems.www.authoring.cgi
  786.      comp.answers
  787.      news.answers
  788.  FAQ-Archive (ftp) [Note: Tcl FAQ may be many files, Tk FAQ is one file]
  789.      ftp://ftp.aud.alcatel.com/tcl/docs/                          198.64.191.10
  790.      ftp://rtfm.mit.edu/pub/usenet/news.answers/tcl-faq
  791.      ftp://rtfm.mit.edu/pub/usenet/news.answers/tcl-faq/tk
  792.  WWW-FAQ for Tcl/Tk
  793.      http://www.teraform.com/%7Elvirden/tcl-faq/
  794.      http://www.smartpages.com/faqs/tcl-faq/top.html
  795.      http://www.smartpages.com/bngfaqs/comp/lang/tcl/top.html
  796.      http://www.cis.ohio-state.edu/hypertext/faq/usenet/tcl-faq/top.html
  797.    http://www.cis.ohio-state.edu/hypertext/faq/bngusenet/comp/lang/tcl/top.html
  798.      http://www.sco.com/Technology/tcl/Tcl.html
  799.  World Wide Web - Tcl/Tk info sites
  800.    Canada
  801.      http://web.cs.ualberta.ca/~wade/Auto/Tcl.html
  802.    UK
  803.      http://http2.brunel.ac.uk:8080/~csstddm/TCL2/TCL2.html
  804.      http://www.cis.rl.ac.uk/proj/TclTk/
  805.    USA
  806.      http://www.yahoo.com/Computers_and_Internet/Languages/Tcl_Tk/index.html
  807.      http://www.sunlabs.com/research/tcl/docs.html
  808.      http://www.sunlabs.com/research/tcl/4.0.html
  809.      http://www.sco.com/Technology/tcl/Tcl.html
  810.      http://www.neosoft.com/tcl/
  811.      http://www.elf.org/tcltk-man-html/contents.html
  812.  Tcl/Tk - miscellaneous extensions
  813.      ftp://ftp.cme.nist.gov/pub/expect/
  814.      http://www.cs.hut.fi/~kjk/porttk.html
  815.      http://www.cis.upenn.edu/~ioi/tix/tix.html
  816.      http://www.ece.cmu.edu/afs/ece/usr/svoboda/www/th/homepage.html
  817.      http://www.tcltk.com/ [incr Tcl]
  818.      http://www.neosoft.com/tcl/TclX.html
  819.      http://www.eolas.com/eolas/webrouse/tcl.htm [WebWish]
  820.      http://www.se.cuhk.hk/~hkng2/big5tk/big5tk.html
  821.      http://www.cs.uoregon.edu/~jhobbs/work/ [BLT etc.]
  822.  
  823.  X Documentation
  824.  +++++++++++++++
  825.  
  826.  Tk certainly makes the generation of GUI code a lot easier than hard coding
  827.  things in traditional compiled languages such as C, C++, or Lisp. Nevertheless
  828.  there is a very large body of X documentation out there that will assist all
  829.  widget and GUI builders with issues of design, implementation, etc. Hence it is
  830.  good practice to be informed of the general design goals of X itself as well as
  831.  the other toolkits that have been built on top of X. 
  832.  
  833.  There are a number of X resources on the internet including: 
  834.  
  835.  Newsgroups
  836.      comp.windows.x
  837.      comp.windows.x.announce
  838.      comp.windows.x.apps
  839.  X FAQs:
  840.      ftp://ftp.x.org/contrib/faqs/
  841.  X FAQ on the World Wide Web:
  842.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-1
  843.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-2
  844.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-3
  845.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-4
  846.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-5
  847.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-6
  848.      http://www.x.org/ftp/contrib/faqs/x-faq-multipart/x-faq-7
  849.  X Window System book info on the Web:
  850.      http://www.x.org/ftp/contrib/docs/Xbibliography.OReilly
  851.      http://www.ora.com/catalog/v1/
  852.      http://www.ora.com/catalog/v2/
  853.      http://www.ora.com/catalog/v3/
  854.      http://www.ora.com/catalog/v4/
  855.      http://www.ora.com/catalog/v5/
  856.      http://www.ora.com/catalog/v6a/
  857.      http://www.ora.com/catalog/v6b/
  858.      http://www.ora.com/catalog/v6c/
  859.      http://www.ora.com/catalog/r6/noframes.html
  860.      http://www.ora.com/oracom/prog/flanart.html
  861.  World Wide Web - X Window System info sites
  862.      http://www.x.org/
  863.      http://www.x.org/consortium/GettingX.html
  864.      http://www.x.org/consortium/x_info.html
  865.      http://www.x.org/consortium/R6.1doc/man/X11/
  866.      http://www.wolfram.com/~cwikla/widget/
  867.      http://www.zeta.org.au/~rosko/pigui.htm
  868.      http://www.rahul.net/kenton/xsites.html
  869.      http://www.unx.com/DD/txaCurrent.shtml
  870.  
  871.  ______________________________________________________________________
  872.  
  873.  
  874.  
  875.  8. How do I write scripts in perl/Tk? 
  876.  
  877.  Start your script as you would any perl script (e.g. #!/usr/bin/perl, 
  878.  #!/usr/local/bin/perl, #!/opt/bin/perl, [built static? then 
  879.  #!/usr/bin/tkperl], whatever, see the perlrun(1) man page for more
  880.  information).
  881.  Throwing the -w warning switch is recommended.
  882.  The use of the statement use strict; is recommended.
  883.  Use of the statement use Tk; is required.
  884.  
  885.  A simple "Hello World!" widget script could be written as follows: 
  886.  
  887.      #!/usr/local/bin/perl -w
  888.  
  889.      use strict;
  890.      use Tk;
  891.  
  892.      my $main = new MainWindow;
  893.      $main->Label(-text => 'Hello World!'
  894.                   )->pack;
  895.      $main->Button(-text => 'Quit',
  896.                    -command => sub{exit}
  897.                    )->pack;
  898.      MainLoop;
  899.  
  900.  The MainLoop; statement is the main widget event handler loop and is
  901.  usually found in perl/Tk scripts (usually near the end of the main procedure
  902.  after the widgets have been declared and packed). MainLoop; is actually a
  903.  function call and you may see it written as MainLoop();, &Tk::MainLoop;, 
  904.  &Tk::MainLoop();, etc. 
  905.  
  906.  Note the use of the -> infix dereference operator. Most things in calls to
  907.  perl/Tk routines are passed by reference. 
  908.  
  909.  Note also the use of the => operator which is simply a synonym for the comma
  910.  operator (well it is a bit more than that :-). In other words, the arguments that
  911.  get passed to Label and Button in the above example are good old perl 
  912.  associative arrays (perl 5 people prefer to call them "hashes" however).
  913.  Indeed, we might have written the above as: 
  914.  
  915.      #!/usr/local/bin/perl -w
  916.  
  917.      use strict;
  918.      use Tk;
  919.  
  920.      my $main = new MainWindow;
  921.      $main->Label(-text , 'Hello World!'
  922.                   )->pack;
  923.      $main->Button(-text , 'Quit',
  924.                    -command , sub{exit}
  925.                    )->pack;
  926.      MainLoop;
  927.  
  928.  Or even as: 
  929.  
  930.      #!/usr/local/bin/perl -w
  931.      use strict;
  932.      use Tk;
  933.      my $main = new MainWindow;
  934.  
  935.      my %hello = ('-text','Hello World!');
  936.      my %quit_com = ('-text' => 'Quit', '-command' => sub{exit});
  937.  
  938.      $main->Label(%hello)->pack;
  939.      $main->Button(%quit_com)->pack;
  940.      MainLoop;
  941.  
  942.  Note however, that the use of the => in the first method of writing this script
  943.  makes it look more "Tcl-ish" :-). 
  944.  
  945.  Lastly, we note the extensive use of the my function in most perl/Tk programs.
  946.  my is roughly equivalent to local in Perl 4 - but is purported to be "faster and
  947.  safer" as well as much more strictly local in scope. See perlfunc(1)
  948.  manpage for more information on my. 
  949.  
  950.  Other examples of code may be found in the perl5/Tk/demos/ directory
  951.  and in perl5/Tk/demos/widget_lib/. 
  952.  
  953.  (A variant on this scipt called hello is available in the file 
  954.  perl5/Tk/demos/hello in your own pTk distribution. Also, Source code
  955.  for this and other examples from UserGuide.pod may be found at 
  956.  http://w4.lns.cornell.edu/~pvhp/ptk/pod/. To load code from the web save as a
  957.  local filename, edit the first line to point to your perl interpreter, then: chmod
  958.  u+x filename, then execute: filename.) 
  959.  
  960.  ______________________________________________________________________
  961.  
  962.  
  963.  
  964.  9. What widget types are available under perl/Tk? 
  965.  
  966.  The following Tk widget primitives are available under perl/Tk: 
  967.  
  968.   o Button 
  969.   o Canvas 
  970.   o Checkbutton 
  971.   o Entry 
  972.   o Frame 
  973.   o Label 
  974.   o Listbox 
  975.   o Menu 
  976.   o Menubutton 
  977.   o Message 
  978.   o Radiobutton 
  979.   o Scale 
  980.   o Scrollbar 
  981.   o Text 
  982.   o Toplevel 
  983.  
  984.  The following are Tix widget primitives available under perl/Tk: 
  985.  
  986.   o HList 
  987.   o InputOnly 
  988.  
  989.  There are (a lot of) other [compound|composite|constructs] available too. You
  990.  can also synthesize new widgets out of these primitives using perl5's
  991.  object-oriented multiple inheritance features. You can even build entirely new
  992.  widget primitives from raw C (XS) code then use and re-use that. (Perl 5 is
  993.  extremely configurable.) 
  994.  
  995.  A good introduction to the primitives and how they may be used in
  996.  conjunction with each other may be found in the widget demo script. Note
  997.  that all the widget demos have a "Show Code" button. To help figure out what
  998.  is happening in the script you may, when the window appears, edit the text and
  999.  instrument the code with print statements and then simply press "Rerun
  1000.  Demo". Another place to see examples of the primitives (on the web) is at the
  1001.  image supplement to this FAQ at the following URL: 
  1002.  
  1003.      http://w4.lns.cornell.edu/~pvhp/ptk/ptkIMG.html
  1004.  
  1005.