Mac OSX comes pre-installed with Perl. This is how you install CPAN modules into the bundled Perl. Don’t know what Perl or CPAN is? This article isn’t for you. 😛
It needs to be done as root, so use sudo.
- Open Terminal.
- Launch the CPAN shell and enter the password when requested:
sudo perl -MCPAN -e "shell"
- Download the CPAN library you want to install (example is Mac::iTunes::Library):
- Install the library:
- Exit the CPAN shell.
Now you can include the module in your Perl application as so:
Pingback: OSX, Perl, Curses, and @INC | Unfinished Bitness