cpan2port

Ryan Schmidt ryandesign at macports.org
Tue Mar 24 00:16:01 PDT 2009


I wanted to use cpan2port today for the first time to make a perl  
module port. I ran into some problems.


First, I had hoped to find cpan2port in the contrib section of the  
repository:

http://trac.macports.org/browser/contrib

but it's not there. I found it on the official site here:

http://mc.koha-fr.org/mac/cpan2port/lastest

and an older version here:

http://geeklair.net/~dluke/cpan2port

Can it be put into the contrib section of the repository instead?


Second, the first line of the script is

#! /usr/bin/perl

Why is it using Mac OS X perl and not MacPorts perl? Perhaps it could  
use "#! /usr/bin/env perl" so that it would use the perl that I prefer.


Third, I tried to run the script with no parameters, expecting a  
usage message, but I got:

$ ./cpan2port.pl
Can't locate Module/Depends.pm in @INC (@INC contains: /System/ 
Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/ 
5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/ 
5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread- 
multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl / 
System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/ 
Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1)  
at ./cpan2port.pl line 22.
BEGIN failed--compilation aborted at ./cpan2port.pl line 22.

The script appears to want a module Module::Depends but I guess Mac  
OS X doesn't provide this. I don't want to use CPAN to install any  
modules in my Mac OS X perl; I want to use MacPorts to install perl  
modules for use with MacPorts perl. Then again, we don't seem to have  
a port p5-module-depends either. Can we add this and any other ports  
this script needs?



Maybe I'm going about this wrong. Clearly the author of the script  
got it to work, and I assume others have as well since it was  
announced. Should I be doing something different to use this script?




More information about the macports-dev mailing list