原文:
4. Where is it? Source code
The latest production and alpha releases are available from the modules/by-authors/Nick_Ing-Simmons/ directory on the CPAN. If building from source code you will need a made and installed perl (Perl 5.005 or later being an excellent choice), a recent MakeMaker and the Tk kit. To obtain all of these (as well as several other modules that sophisticated Tk programs now rely on) visit a CPAN ftp site. CPAN (the Comprehensive Perl Archive Network) and what you need to get from it, is discussed in more detail in the next question.
ActiveState Corporation has taken over the chore of maintaining what originated as Gurusamy Sarathy's binary distribution for WinNT, Win95, Win98, and Win2000. [Mention license considerations here?] This is what you must do to "use Tk" with ActivePerl:
1. Download and install version 1.1 or greater of the Windows Installer (while the installation claims a reboot is necessary, Cameron Laird found it not to be so for WinNT);
2. Download the ActivePerl 618 distribution:
3. From Windows Explorer, activate the distribution just downloaded [what's the command-line way?]. This installs ActivePerl;
4. From a command line, invoke ppm install Tk;
5. At this point, you can perl -e "use Tk" from a command line, and you're ready to code Perl/Tk source.
Jon Bjornstad gives more details about the process, some of which you might particularly need if you work with ActivePerl before release 618.
(While the next question treats CPAN in detail, the remainder of this answer points out some non CPAN resources, as well as some historical resources.)
Tk-b8: The Tk-b8 kit remains on CPAN since it was compatible with the widely distributed and installed Perl (5.001m) Binaries
A pre-compiled binary distribution of Perl5.001m with Tk-b8 for Linux is available from: Australia (please be patient and only try during off hours) ftp://syd.dit.csiro.au/pub/perl5/local/perl5.001m+Tk-b8-Linux-ELF.tar.gz
It unpacks into /usr/local. You need to have ELF running and to have the ELF X11 libraries (please be patient and only try during off hours).
Binaries for the old Perl 5 & Tk-b6 are available for a number of UNIX platforms courtesy of Thomas Schlagel and Alan Stange of Brookhaven Lab at: USA http://pubweb.bnl.gov/~ptk/
Thomas and Alan have recently (winter 1995-1996) announced that they will update the Tk module version number of the many binaries they distribute. Physical media (mostly source code)
With traffic jams on today's information superhighway more and more common it is often convenient to be able to snail mail a Read Only Memory Compact Disk rather than suffer with .tar.gz files that are corrupted by network spottiness. Here is a very brief list of some folks who distribute perl (and hopefully Tk too!) on physical media. This list is not intended to be complete, nor an endorsement of any vendor (I personally do not have the time to check out any of these but have noticed that some tend to be a few months out of date with respect to CPAN so please be careful). See the hypertext version of this document for hyperlinks to the following vendors:
Perl Developer's Toolkit from Advice Press; 366 Cambridge Ave.; Palo Alto, CA 94306
ISBN: 1-889671-15-0 $39.95, is also available via a subscription plan. This CD is organized by Jon Orwant (the organizer of comp.lang.perl.tk and the publisher of The Perl Journal.
Walnut Creek Perl CD from Walnut Creek CDROM; 4041 Pike Lane, Suite E; Concord, CA 94520
This CD specifies a release date. $39.95
Cosmos Engineering Company
Offers Linux plus perl for sale on a 1 Gigabyte IDE hard drive for PC-like computers. $279.00 (Fall 1996)
Unix Review System Administration
A CD that contains "Perl 5.0" (and much other stuff including Tcl/Tk and Expect) for $49.95. Telephone: (800) 444-4881.
InfoMagic Mother of Perl
This 2 CD set contains perl 5.001 and sells for $35.00
Ready to Run
Perl (unknown version) available for sale for many types of Unix and other operating systems.
译文:
4. 哪里有Perl/Tk?
源代码
最新的稳定版本和测试版都可以从CPAN的modules/by-authors/Nick_Ing-Simmons/目录中下载。如果是由源代码编译安装,那么你需要有Perl环境(最好是Perl 5.005或者更高)、一个较新版本的make编译工具和Tk包。所有的这些(同时包括一些其它的相关的模块)都可以从CPAN的ftp站点下载。关于CPAN(综合Perl档案网络,the Comprehensive Perl Archive Network)的问题我们将在下一个问题中具体讨论。
最初由Gurusamy Sarathy发起的为WinNT、Win95/98和Win2000提供二进制版本(binary distribution)工作现在已经被ActiveState公司接管了。如果你想在ActivePerl中使用Tk,你可以这样做:
1. 下载并安装1.1(或更高)版本的Windows Installer(作者发现在WinNT系统中安装它无须重启);
2. 下载ActivePerl 618安装包;
3. 在资源管理器中运行上面下载的安装包,这样就安装了ActivePerl;
4. 在命令行中输入:ppm install Tk;
5. 此时你可以在命令行里输入:perl –e “use Tk”,如果一切顺利,说明你已经可以用Perl/Tk了。
Jon Bjornastad给出了更详细的过程说明,其中有些对于使用618之前的版本的ActivePerl的用户可能特别有用。
(因为我们的下一个问题是重点讨论CPAN的,所以这个回答的下面部分我们将给出一些非CPAN的资源和一些历史资源。)
Tk-b8:因为Tk-b8工具包和已经被广泛使用的Perl(5.001m)相兼容,所以它一直被保留在CPAN上。
二进制版本
为Linux平台预编译好的Perl5.001m和Tk-b8可以从下面的站点下载:
澳大利亚(请在业余时间下载,并保持耐心)
ftp://syd.dit.csiro.au/pub/perl5/local/perl5.001m+Tk-b8-Linux-ELF.tar.gz
它将释放到/usr/local目录中。你的系统需要有ELF X11的库并且保证其运行。
Brookhaven实验室的Thomas Schlagel和Alan Stange为很多Unix平台的系统提供了老版本的Perl5和Tk-b6:
美国http://pubweb.bnl.gov/~ptk/
实物(大部分是源代码)
(译者注:因为其价格一般都太贵,对国人而言不太适用,所以就不译了……有兴趣的自己看吧:P)