Today is only my second day using Mac OS (v10.8), and I’m not yet convinced that it’s better than Windows/Linux – at least for programming. That said, I did something that I read couldn’t be done – I was able to install Perl/Tk for Mac OS X.
Granted it turns out once I figured it out it was pretty trivial to get it to work, but it wasn’t entirely obvious to this guy who hasn’t used a Mac since OSv7. That said, the steps are:
- Install X Windows for Mac (http://xquartz.macosforge.org/trac/wiki/X112.7.4).
- Install Xcode (download from https://developer.apple.com/) and then select Preferences ->; Downloads ->; Command Line Tools – this is the easiest way to get a copy of gcc.
- Open a terminal and run “sudo cpan” – installation won’t work properly unless CPAN has root access.
Now people might as me why would I want to use such an antiquated module on a Mac? First off, assuming all the proper modules are installed, any Perl/Tk script could be written to be platform-independent software. Plus I think writing a proper, self-contained, web-enabled script could be tricky, especially when it comes to keeping user workflows and application states all straightened out. (But that’s just my opinion.) Besides I want to see how Perl/Tk works.