Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

How do you install Perl modules on a Mac?

by Spidy (Chaplain)
on Jul 07, 2005 at 21:57 UTC ( [id://473254]=perlquestion: print w/replies, xml ) Need Help??

Spidy has asked for the wisdom of the Perl Monks concerning the following question:

I've heard various people say various things on this, but I decided that the best way to get it figured out would be to go to the monks themselves. Be that as it may, do any of you know how I would install a module off of CPAN on a Mac?

Thanks in advance,
Spidy

Replies are listed 'Best First'.
Re: How do you install Perl modules on a Mac?
by Nkuvu (Priest) on Jul 07, 2005 at 22:04 UTC
    From the Terminal (in /Applications/Utilities):
    sudo perl -MCPAN -e shell
    enter your password when prompted, then
    install some::module
    In the CPAN shell, you can search for modules using the command
    i Exact::Module::Name
    or
    i /regex/

    You can also install fink and install Perl modules that way, but I personally don't do that, so can't give specific syntax.

      I've started calibrating the CPAN thing, but where is my make program?

        You have to install the Developer Tools that came on the CD with OS X (they're downloadable from Apple, too, I think). Then the CPAN config should find it automatically. Otherwise, from your terminal type 'which make' -- if that doesn't work, then make isn't in your path, and you should try 'sudo find / -name "make" -type f' and look through any results.

        Don't put the single quotes around the commands, I put them in only for clarity.

        Larry Wall is Yoda: there is no try{}
        The Code that can be seen is not the true Code
        You need to install the X-Code Tools. They should be on your Tiger- or Panther-CD.
Re: How do you install Perl modules on a Mac?
by Cody Pendant (Prior) on Jul 08, 2005 at 01:17 UTC
    Just to note, once you've installed the Dev Tools, you probably don't need "sudo perl -MCPAN -e shell", you should be able to just use "sudo cpan" to start it up.


    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://473254]
Approved by Corion
Front-paged by Thilosophy
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2024-03-28 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found