I'm having difficulty installing modules on my Mac. I'm currently running Snow Leopard. I have tried installing directly from the CPAN from the command line using cpan Foo::Bar. I also downloaded the tarball from CPAN onto my Desktop folder and executed perl Makefile.PL.
The command line tells me everything is fine (I checked Makefile.pl and installed any dependencies which get's the same thumbs up from the Terminal). I also seem in the clear when executing perl Makefile.PL. However, when I try to run a test script to see if the module(s) installed correctly I still get Can't locate Foo/Bar.pm in @INC I have even dragged the folder for the module and dropped it in the Library/Perl/5.10.0/ directory.
I read through Apple's Perl 5.10 documentation on (@INC) but am having trouble making heads or tails.
FYI: This latest attempt involved installing: Test::Template, YAML::Any, YAML::XS and YAML::Old. Testing after installing each with similar results.
UPDATE: Drag and Drop the ModuleName.pm file and it's related folders into HardDriveName/Library/Perl/5.10.0/.
I realize this sounds too good to be true but so far it's actually worked two out of three times. For module packages that are made up of .PM files (Aside from the obvious MakeFiles) try just dragging the file and/or the folder immediately enclosing it.For example: I installed the Text::Template module by first uncompressing the folder then grabbing the 'Text' folder which contains the Template.PM file and dropped it into HardDriveName/Library/Perl/5.10.0/. Ran a quick test script and BINGO! This worked with the SVG module as well but I dropped both the SVG.pm file along with the 'SVG' folder which contains DOM.pm, Element.pm, Extension.pm, Manual.pm, XML.pm ran another test script and I had an SVG file that I opened in Firefox.
*NOTE: I did not have such success with the Mac::Glue module. Perl complains about an .ix file.
**NOTE: I WAS able to use drag and drop to install Mojolicious successfully!
UPDATE:
I used Apple's Disk Utility to check permissions and sure enough here's what I got:
Group differs on "System/Library/Perl/5.10.0/CPAN.pm", should be 0, group is 501.
Permissions differ on "System/Library/Perl/5.10.0/CPAN.pm", should be -rw-r--r-- , they are -rwxrwxr-- .
I went ahead and repaired the permissions. I then went to the terminal, reinstalled Text::Template from the CPAN and tried another test. — Same error.
After some more digging I learned that any additional modules are looked for by @INC in "System/Library/Perl/Updates/5.10.0". So I dragged the Text::Template folder there, ran another test script and nothing. Should I pull down the files again, place the folder in .../Perl/Updates/5.10.0 and execute the Makefile.pl?
Isn't there a way to get @INC to look for new modules where all the other core modules are located?
In reply to @INC Problems in Mac OSX Snow Leopard by luis.roca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |