Mapping Perl module names to corresponding FreeBSD port names

Ronald F. Guilmette rfg at tristatelogic.com
Mon Feb 4 22:32:37 UTC 2013


I am, at long last, moving my main system over onto a new drive where
I have just installed a fresh copy of 9.1-RELEASE, and where I have
built and installed essentially all of the ports I had on my old
(8.3-RELEASE) system... at least the ones that I am actually still
actively using.

A problem arises however in the case of the various p5-* (Perl) ports
that I have installed on my old 8.3 system.  How can I know which of
these I really need to install on my new 9.1 system, you know, in order
to make sure that all of my existing/old Perl scripts will continue to
function?

pkg_info says that I currently have 84 different p5-* ports installed
on my old 8.3 system.  The list of these is attached below.  (I suspect
that many/most of these I installed temporarily, just for some one-off
task, and that I no longer need to have them installed, e.g. on my new
system.)

I keep all of my personal scripts and compiled programs in a directory I
call /usr/local/rfg/bin.  I have gone into that directory and done:

	grep '^use ' | sort -u

in order to find all the the Perl module names that my various personal
Perl scripts are using.  The result is the following (which has been
trimmed a bit to remove irrelevant fluff):

use CGI::Lite;
use Cwd;
use Email::MIME;
use Encode;
use HTML::TreeBuilder;
use IO::Handle;
use LWP::Simple;
use List::Util qw(min max);
use Net::CIDR::Lite;
use Net::DNS;
use Time::localtime;
use URI::Escape;

So basically, on my new system, I need to install all of the p5-* FreeBSD
ports that correspond to the above set of Perl modules.  In order to
do this, I need to somehow derive the corresponding FreeBSD p5-* port
names from the Perl module names listed above.

In some cases, the mapping is both straightforward and obvious, e.g.:

	CGI::Lite	=>	p5-CGI-Lite
	Email::MIME	=>	p5-Email-MIME
	Net::DNS	=>	p5-Net-DNS

however in many other cases the correct mapping is not immediately obvious.

So, I need to ask:  Is there some simple automated way to map each of the
above Perl module names into a corresponding FreeBSD p5-* port name?
If not, is there a map published somewhere that I could just refer to in
order to find the name of the specific FreeBSD port that corresponds to
any given (CPAN-published) Perl module?


List of currently installed p5-* packages
=========================================================================
p5-AnyEvent
p5-Authen-NTLM
p5-CGI-Lite
p5-CPAN-Meta
p5-CPAN-Meta-Requirements
p5-CPAN-Meta-YAML
p5-Cairo
p5-Compress-Raw-Bzip2
p5-Compress-Raw-Zlib
p5-Convert-BinHex
p5-Digest-HMAC
p5-Email-Address
p5-Email-Date-Format
p5-Email-MIME
p5-Email-MIME-ContentType
p5-Email-MIME-Encodings
p5-Email-MessageID
p5-Email-Simple
p5-Encode-Locale
p5-Event
p5-Event-ExecFlow
p5-Event-RPC
p5-ExtUtils-CBuilder
p5-ExtUtils-Depends
p5-ExtUtils-ParseXS
p5-ExtUtils-PkgConfig
p5-File-Listing
p5-Font-AFM
p5-Glib2
p5-Gtk2
p5-Gtk2-Ex-FormFactory
p5-Gtk2-Ex-Simple-List
p5-HTML-Form
p5-HTML-Format
p5-HTML-Parser
p5-HTML-Tagset
p5-HTML-Tree
p5-HTTP-Cookies
p5-HTTP-Daemon
p5-HTTP-Date
p5-HTTP-Message
p5-HTTP-Negotiate
p5-HTTP-Server-Simple
p5-IO-Compress
p5-IO-Socket-INET6
p5-IO-Socket-SSL
p5-IO-stringy
p5-JSON-PP
p5-LWP-MediaTypes
p5-Lchown
p5-Locale-gettext
p5-Locale-libintl
p5-MIME-Base64
p5-MIME-Tools
p5-MIME-Types
p5-Mail-Tools
p5-Module-Build
p5-Module-Metadata
p5-Net-CIDR-Lite
p5-Net-DNS
p5-Net-HTTP
p5-Net-IP
p5-Net-LibIDN
p5-Net-SSLeay
p5-Pango
p5-Parse-CPAN-Meta
p5-Perl-OSType
p5-Socket6
p5-Storable
p5-TimeDate
p5-URI
p5-Unicode-Map8
p5-Unicode-String
p5-WWW-Mechanize
p5-WWW-RobotRules
p5-XML-NamespaceSupport
p5-XML-Parser
p5-XML-SAX
p5-XML-SAX-Base
p5-XML-SAX-Expat
p5-XML-Simple
p5-libwww
p5-type1inst
p5-version


More information about the freebsd-questions mailing list