For any of this to work, you must have X11 installed. Apple provides X11.app (the X11 development environment) for Tiger and Panther on your install CDs or DVD.
tar -zxvpf Tk-804.027.tar.gz cd Tk-804.027 perl Makefile.PL make make test sudo make installHelpful comments from others on my install instructions here.
From: Michael Doster7) Replace the file Tk/MMutil.pm with this patched copy.Date: Mon Aug 26, 2002 22:30:53 US/Eastern To: Subject: Re: Mac "Jaguar" and Perl/Tk, is it safe? Hello all, In Mac OS X 10.2, a hacked dyld is no longer necessary to get Perl/Tk to work. Here's how: 1) First, upgrade to Mac OS 10.2 (Jaguar). If you do a clean install, pay close attention to steps 3 and 4. 2) Install the latest development tools from the included Developer Tools CD. 3) If XDarwin doesn't work - and it won't if you did a "clean install" - them simply reinstall from: http://sourceforge.net/project/showfiles.php?group_id=18034&release_id=71056 First install XInstall_10.1.sit Then install the fixed xterm Jaguar_XTerm_Update.zip. 4) If you run OroborOSX and need to re-install, get it here: http://oroborosx.sourceforge.net/download.html#v075a1 5) Fetch perl-5.8.0.tar.gz from CPAN and install thusly: tar -zxpf perl-5.8.0.tar.gz cd perl-5.8.0 sh Configure -des make make test (97% pass) sudo make install That replaces the default Apple 5.6.0 Perl. 6) Fetch Tk800.024.tar.gz from your favorite CPAN mirror such as this one: http://mirrors.develooper.com/perl/backup.pause/authors/id/N/NI/NI-S/ tar -zxpf Tk800.024.tar.gz cd Tk800.024 perl -v (ensure 5.8.0 is found)
8) While running XDarwin and your favorite terminal app (xterm,rxvt, etc.) do the usual from the Tk800.024 directory: perl Makefile.PL make make test sudo make install
Under the pTk source directory edit the file Tk/MMutil.pm. In the subroutine cflags make the following change at the end: $_ .= "\nOPTIMIZE=\n"; $_; } # end subroutine cflags.If you install via CPAN and do not have access to the distribution, you can also change Perl's master configuration file /System/Library/Perl/darwin/Config.pm. Change the optimizeoption from optimize='-O3' to optimize=''.