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: