Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: migrate cpan from AIX to Red Hat

by rurban (Scribe)
on Jul 30, 2013 at 17:37 UTC ( #1047083=note: print w/replies, xml ) Need Help??


in reply to migrate cpan from AIX to Red Hat

find /usr/lib/perl5 -name \*.pm | xargs yum whatprovides will not work because the prefix will be different. But it is a good idea. dists can be named differently to modules.

I thought of using CPAN or a simple script like instmodsh (from ExtUtils::Installed) to get the list of your modules, and then mangle the names to find the rpm's.

perldoc ExtUtils::Installed

Replies are listed 'Best First'.
Re^2: migrate cpan from AIX to Red Hat
by sazo (Novice) on Jul 31, 2013 at 08:36 UTC
    I found the option to consider the modules in a given directory my $installed = ExtUtils::Installed->new(extra_libs=>["/my/lib/path"]); But I still don't understand why is there a huge difference in the number of modules found by this method and by using find *.pm? There are more than 10x more .pm files as modules found by this method. Can multiple .pm files belong to a module?
      I found it out: it seem a module can contain several .pm files.
Re^2: migrate cpan from AIX to Red Hat
by sazo (Novice) on Jul 31, 2013 at 08:08 UTC
    I have been working on a solutions that is based on the find *.pm and yum whatprovides, but it needs a lot of parsing of the yum output in order to create a list of rpms and repositories that need to be installed on the new RH machines. Thanks for the tip with the Extutils:Installed. Unfortunatelly, listing the installed modules using instmodsh only shows a tiny fraction of all the installed modules, probably because they are installed outside the default directories.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1047083]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2022-08-18 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?