Sponsored Content
Top Forums Shell Programming and Scripting Building my own CPAN repository Post 302404902 by dennis.jacob on Wednesday 17th of March 2010 12:45:53 PM
Old 03-17-2010
Quote:
Originally Posted by pludi
You can mirror CPAN using either rsync as detailed in How do I mirror CPAN? in the CPAN FAQ, or by using the CPAN::Mini module (and the minicpan utility). Both will mirror down the sources for Perl (minicpan only the most current version), but from there you'll have to build it yourself.
That is just the first part .ie, making it sync with the cpan mirror in one server. But even if he make it sync, he needs to have that installed modules available to all other servers.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

CYGWIN/CPAN install of Expect.pm

I am attempting to install a Perl Expect module via the CPAN . CPAN goes through the process but nothing happens, sample perl scripts can not find the Expect Module. CPAN was configured via the Default process " Are you ready for manual configuration? " answered "no". CPAN install seemed to find... (1 Reply)
Discussion started by: white222
1 Replies

2. Shell Programming and Scripting

CPAN: using only wget to d/l modules?

Is there a way to tell CPAN not to use Net::Ftp and the ftp binary? I want to only use wget to download perl modules. (2 Replies)
Discussion started by: dangral
2 Replies

3. Shell Programming and Scripting

Automating CPAN on FreeBSD

When using CPAN for the first time, a number of questions are prompted to the user, thereby halting the process. Since I am running FreeBSD I was wondering whether the inclusion of the port instead leads to the same result. So instead of having the following: perl -MCPAN -e "install DBD::SQLite"... (12 Replies)
Discussion started by: figaro
12 Replies

4. Shell Programming and Scripting

Error while trying to install from CPAN

Hi i was trying to install Text::CSV from cpan... it seemed to have downloaded everythign properly but was not able to run the make file... do u have any idea as to why this happened?? Install: ============================= If you install Text::CSV_XS v.0.70, it makes Text::CSV faster. ... (5 Replies)
Discussion started by: VGR
5 Replies

5. UNIX for Dummies Questions & Answers

Problem to upgrade CPAN

Hi all, Since yesterday, I'm trying to upgrade CPAN on my Synology sevrer, because I have the next message in CPAN shell : cpan> install cpan CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Going to read /root/.cpan/sources/authors/01mailrc.txt.gz CPAN: Compress::Zlib... (2 Replies)
Discussion started by: mikael2235
2 Replies

6. Shell Programming and Scripting

cpan installation

Hi All, I need to install perl module using cpan, so befor that i checked cpan is installed or not . i tried , and got below output.but it is not clear to me. can u plz explain me. I dont know what the exactly cpan is useful. and in below why it is trying to create directory. $ cpan... (2 Replies)
Discussion started by: aish11
2 Replies

7. Shell Programming and Scripting

Unable to install module using cpan

Hi, I am unable to install module using cpan. It says 407 Proxy Authentication Required I did setup proxy server and given username and password in .bashrc file and apt.conf file. export http_proxy=http://username:password@proxyserver:portno/ However, still unable to install... (1 Reply)
Discussion started by: Anjan1
1 Replies

8. Red Hat

Error: Cannot retrieve repository metadata (repomd.xml) for repository: InstallMedia.

Most of my commands are returning this error on RHEL 6 64 bit: Also I tried installing many sofwtares, but it fails to correctly work. For example I treid installing dos2unix: # rpm -ivh dos2unix-5.3.3-5.ram0.98.src.rpm 1:dos2unix warning: user mockbuild does not... (0 Replies)
Discussion started by: India_2014
0 Replies

9. UNIX for Dummies Questions & Answers

How to install CPAN without using yum on Linux?

Hi all, I am on Linux box where CPAN is not working for downloading any perl modules. When I try "perl -MCPAN -e shell" as root as well as a user, I get following error: Can't locate CPAN.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl... (2 Replies)
Discussion started by: pat_pramod
2 Replies
CPAN::Mini(3pm) 					User Contributed Perl Documentation					   CPAN::Mini(3pm)

NAME
CPAN::Mini - create a minimal mirror of CPAN VERSION
version 1.111008 SYNOPSIS
(If you're not going to do something weird, you probably want to look at the minicpan command, instead.) use CPAN::Mini; CPAN::Mini->update_mirror( remote => "http://cpan.mirrors.comintern.su", local => "/usr/share/mirrors/cpan", log_level => 'debug', ); DESCRIPTION
CPAN::Mini provides a simple mechanism to build and update a minimal mirror of the CPAN on your local disk. It contains only those files needed to install the newest version of every distribution. Those files are: o 01mailrc.txt.gz o 02packages.details.txt.gz o 03modlist.data.gz o the last non-developer release of every dist for every author METHODS
update_mirror CPAN::Mini->update_mirror( remote => "http://cpan.mirrors.comintern.su", local => "/usr/share/mirrors/cpan", force => 0, log_level => 'debug', ); This is the only method that need be called from outside this module. It will update the local mirror with the files from the remote mirror. If called as a class method, "update_mirror" creates an ephemeral CPAN::Mini object on which other methods are called. That object is used to store mirror location and state. This method returns the number of files updated. The following options are recognized: o "dirmode" Generally an octal number, this option sets the permissions of created directories. It defaults to 0711. o "exact_mirror" If true, the "files_allowed" method will allow all extra files to be mirrored. o "ignore_source_control" If true, CPAN::Mini will not try to remove source control files during cleanup. See "clean_unmirrored" for details. o "force" If true, this option will cause CPAN::Mini to read the entire module list and update anything out of date, even if the module list itself wasn't out of date on this run. o "skip_perl" If true, CPAN::Mini will skip the major language distributions: perl, parrot, and ponie. It will also skip embperl, sybperl, bioperl, and kurila. o "log_level" This defines the minimum level of message to log: debug, info, warn, or fatal o "errors" If true, CPAN::Mini will warn with status messages on errors. (default: true) o "path_filters" This options provides a set of rules for filtering paths. If a distribution matches one of the rules in "path_filters", it will not be mirrored. A regex rule is matched if the path matches the regex; a code rule is matched if the code returns 1 when the path is passed to it. For example, the following setting would skip all distributions from RJBS and SUNGO: path_filters => [ qr/RJBS/, sub { $_[0] =~ /SUNGO/ } ] o "module_filters" This option provides a set of rules for filtering modules. It behaves like path_filters, but acts only on module names. (Since most modules are in distributions with more than one module, this setting will probably be less useful than "path_filters".) For example, this setting will skip any distribution containing only modules with the word "Acme" in them: module_filters => [ qr/Acme/i ] o "also_mirror" This option should be an arrayref of extra files in the remote CPAN to mirror locally. o "skip_cleanup" If this option is true, CPAN::Mini will not try delete unmirrored files when it has finished mirroring o "offline" If offline, CPAN::Mini will not attempt to contact remote resources. o "no_conn_cache" If true, no connection cache will be established. This is mostly useful as a workaround for connection cache failures. new my $minicpan = CPAN::Mini->new; This method constructs a new CPAN::Mini object. Its parameters are described above, under "update_mirror". mirror_indices $minicpan->mirror_indices; This method updates the index files from the CPAN. mirror_file $minicpan->mirror_file($path, $skip_if_present) This method will mirror the given file from the remote to the local mirror, overwriting any existing file unless $skip_if_present is true. file_allowed next unless $minicpan->file_allowed($filename); This method returns true if the given file is allowed to exist in the local mirror, even if it isn't one of the required mirror files. By default, only dot-files are allowed. If the "exact_mirror" option is true, all files are allowed. clean_unmirrored $minicpan->clean_unmirrored; This method looks through the local mirror's files. If it finds a file that neither belongs in the mirror nor is allowed (see the "file_allowed" method), "clean_file" is called on the file. If you set "ignore_source_control" to a true value, then this doesn't clean up files that belong to source control systems. Currently this ignores: .cvs .cvsignore .svn .svnignore .git .gitignore Send patches for other source control files that you would like to have added. clean_file $minicpan->clean_file($filename); This method, called by "clean_unmirrored", deletes the named file. It returns true if the file is successfully unlinked. Otherwise, it returns false. log_warn log log_debug $minicpan->log($message); This will log (print) the given message unless the log level is too loo. "log", which logs at the info level, may also be called as "trace" for backward compatibility reasons. read_config my %config = CPAN::Mini->read_config(\%options); This routine returns a set of arguments that can be passed to CPAN::Mini's "new" or "update_mirror" methods. It will look for a file called .minicpanrc in the user's home directory as determined by File::HomeDir. config_file my %config = CPAN::Mini->config_file( { options } ); This routine returns the config file name. It first looks at for the "config_file" setting, then the "CPAN_MINI_CONFIG" environment variable, then the default ~/.minicpanrc, and finally the CPAN/Mini/minicpan.conf. It uses the first defined value it finds. If the filename it selects does not exist, it returns the empty list. OPTIONS is an optional hash reference of the "CPAN::Mini" config hash. SEE ALSO
Randal Schwartz's original article on minicpan, here: http://www.stonehenge.com/merlyn/LinuxMag/col42.html CPANPLUS::Backend, which provides the "local_mirror" method, which performs the same task as this module. THANKS
Thanks to David Dyck for letting me know about my stupid documentation errors. Thanks to Roy Fulbright for finding an obnoxious bug on Win32. Thanks to Shawn Sorichetti for fixing a stupid octal-number-as-string bug. Thanks to sungo for implementing the filters, so I can finally stop mirroring bioperl, and Robert Rothenberg for suggesting adding coderef rules. Thanks to Adam Kennedy for noticing and complaining about a lot of stupid little design decisions. Thanks to Michael Schwern and Jason Kohles, for pointing out missing documentation. Thanks to David Golden for some important bugfixes and refactoring. AUTHORS
o Ricardo SIGNES <rjbs@cpan.org> o Randal Schwartz <merlyn@stonehenge.com> COPYRIGHT AND LICENSE
This software is copyright (c) 2004 by Ricardo SIGNES. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.14.2 2011-12-23 CPAN::Mini(3pm)
All times are GMT -4. The time now is 09:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy