So Macs come already preloaded with Perl, and i know i need to use Mechanize to get to the login page for Facebook… The problem is i have to install some Perl modules, so i need CPAN. I found site online that gives you a walkthrough:
Heres the link: http://www.perlmonks.org/?node_id=640489
Heres the info if you are too lazy to follow the link lol:
Despite several posts here and elsewhere, I have still not been successful in installing a Perl module (DateTime). It seems that there is some very basic stuff that I have missed. It has been surprisingly difficult to get this to work. What I need is a step-by-step idiots guide to configure a new Mac (OS X 10.4.10) for the installation of Perl modules, in particular DateTime. When I’ve got it sorted for one Mac, I’m going to repeat the process for other Macs.
Note that the idiots guide MUST be something that anyone can follow, and its got to go through the entire process. What I have in mind goes as follows(its been gleaned from previous posts and websearches, and I don’t claim that it is the right way or the best way to do it) and I invite your comments or suggestions;
1 Make hidden files visible. This allows you to see what’s being installed and where it is being installed. Open Terminal (Applications => Utilities => Terminal) and type the command defaults write com.apple.finder AppleShowAllFiles Yes. The next time you open a finder window, it will show the hidden files.
Note: You’ll never find the likes of usr/bin/perl unless you do this.
2 Install a C compiler. Insert Mac OS X Install DVD, execute XCode Tools => XCodeTools.mpkg, follow the prompts and accept the defaults.
Note: For some reason, you need a C compiler to run Makefile.pl and some other stuff.
3 Terminal operations (make sure your computer is connected to the internet before starting)
3a Open Terminal (Applications => Utilities => Terminal)
3b Type the command sudo perl –MCPAN –e shell
3c Input password (it’s the same password as your login)
3d Do some general maintenance by typing the following commands;
hope this helps