How to install Perl modules

Mine i.cue at dsl.pipex.com
Mon Sep 14 17:40:36 PDT 2009


Hi Ryan,

Initially when I tried your instructions I got an error relating to  
p5-io-compress
when I tried to install p5-libwww-perl. It eventually installed but  
when I looked
into /opt/local/lib/perl5/ I found that two new directories were  
created "site_perl"
and "vendor_perl". vendor_perl contained a 5.8.8 directory with what  
looked like
a duplicate of the files installed in "site_perl".

 From what I can see, some of the files I was trying to install —  
HTML, HTTP, LWP,
URI etc were not installed in the original 5.8.8 Perl directory but  
in the new directories.
Does this mean that the files are not properly installed?

Terrence


On 14 Sep 2009, at 11:41, Ryan Schmidt wrote:

> On Sep 14, 2009, at 05:17, Mine wrote:
>
>> I am trying to run a Perl app called get_iplayer (http:// 
>> linuxcentre.net/getiplayer/) on OSX 10.4.11.
>> I have been told the the following modules are required:
>>
>> Built-ins:
>>
>> use Fcntl
>> use File::Copy
>> use File::Path
>> use File::stat
>> use Getopt::Long
>> use IO::File
>> use IO::Handle
>> use IO::Seekable
>> use IO::Socket
>> use POSIX
>> use POSIX
>> use Socket
>> use Time::Local
>>
>> Ones that aren't in core AFAIK:
>>
>> use CGI
>> use CGI::Cookie
>> use HTML::Entities
>> use HTTP::Cookies
>> use HTTP::Headers
>> use IPC::Open3
>> use LWP::ConnCache
>> use LWP::UserAgent
>> use URI
>> use URI::Escape
>>
>> I think the first set are part of the standard Perl 5 install, but  
>> the second group are options
>> which can be added as required.
>>
>> Can someone please tell me if it is possible to install these  
>> modules using MacPorts.
>> I have searched the available Ports and found p5-cgi, and have  
>> found a few html
>> files, but I am not sure which of these files contain the modules  
>> I need, or how to find
>> the others.
>
> There isn't a way in MacPorts to know what a port installs until  
> after you've installed it, so that's not helpful for figuring out  
> what port you need to install. For Perl modules, I would suggest  
> searching the CPAN web site for the module in question, and it  
> should tell you what package you need to install to get it. To  
> convert a CPAN package name to a MacPorts port name, convert  
> uppercase to lowercase letters, replace "::" with "-" and prepend  
> "p5-".
>
> According to "port contents p5-cgi" (after running "sudo port  
> install p5-cgi") it installs both CGI and CGI::Cookie (and others).
>
> According to a search on cpan.org, HTML::Entities is in the  
> HTML::Parser package, which is the p5-html-parser port.
>
> http://search.cpan.org/search?query=HTML%3A%3AEntities&mode=all
>
> HTTP::Cookies, HTTP::Headers, LWP::ConnCache and LWP::UserAgent are  
> all in p5-libwww-perl.
>
> http://search.cpan.org/search?query=HTTP%3A%3ACookies&mode=all
>
> URI and URI::Escape are in p5-uri.
>
> http://search.cpan.org/search?query=URI%3A%3AEscape&mode=all
>
>> I have found the files on CPAN but I am not sure how to do a  
>> manual install into the
>> opt/ location required by MacPorts.
>
> Please don't use CPAN to manually install files into MacPorts-owned  
> directories; this will confuse MacPorts and prevent it from being  
> able to manage your dependencies properly. Instead, use MacPorts to  
> install these modules. If the modules you need don't exist, file  
> requests for them, or better yet, make the ports and submit them.  
> The cpan2port script makes it very easy to make ports for CPAN  
> modules.
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20090915/019401cd/attachment.html>


More information about the macports-users mailing list