Tuesday, January 6, 2009

How to add PPM Repositories?

How to add PPM Repositories?
  • What is PPM Repositories ?
    • Repository Types
      • PPM Server 3
      • PPM Server 2
      • Web Repositories
      • FTP Repositories
      • Local Repositories
  • Why add new Repositories ?
  • Add PPM Repositories
    • PPM Version 3
    • PPM older versions
  • Manage PPM Repositories
  • Repositories Resources
    • Default Repository
    • Additional Repositories
      • Perl 5.10
      • Perl 5.8
        • My PPM has AS Servers:
        • Other 5.8 only:
        • May also work for 5.6:
      • Perl 5.6
  • Installing non-ActiveState modules:

What is PPM? PPM is the package management utility for ActivePerl. It simplifies the task of locating, installing, upgrading and removing Perl packages. The PPM client accesses PPM repositories on the Internet or on a local network. It is also used to update previously installed packages with the latest versions and to remove unused packages from your system.

What is PPM Repositories ?It is collections of Perl packages/modules.

Repository TypesPPM3 supports several types of package repositories:

1. PPM Server 3
ActiveState's SOAP-driven package server. Because all searches are done server-side, the server can deliver much richer information about packages t
han other repositories.

2. PPM Server 2

The SOAP server designed for PPM version 2. PPM 3.1 ships with the PPM2 repository as well as the PPM3 repository, so you can use either. Simple searches are performed server-side. If your search is too complicated for the server, PPM 3.1 will download the package summary and search by itself.


3. Web Repositories
Older versions of PPM used non-SOAP r
epositories (directories full of PPD files accessible using a web browser). Over the history of PPM, there have been several different ways of organising the files so that PPM can search for packages properly. PPM3 tries to download a summary file first -- if that fails, it gets the directory index. It parses the summary or the index, and caches it. Searches are done from the cache.

4. FTP Repositories
FTP is another way of exposing a directory full of PPD files. PPM3 consideres FTP repositories a subset of Web repositories. Treat them as identical: PPM3 downloads the summary or the "index" (file listing in this case), parses it, and then searches from it.

5. Local Repositories

To support installing packages from the ActiveCD, a local directory can be a repository. PPM searches the files in the directory. All valid path formats are supported, including UNC paths.

Why add new Repositories ?
If you are using PPM (Perl Package Manager) from ActiveState, you may only be using ActiveState own repository to grab and install CPAN modules. However, there are many more repositories around the world, which hold many modules and packages tha
t ActiveState haven't yet loaded into their repository.
By adding these extra repositories, when you type 'install ', instead of just looking in the ActiveState repository, PPM will search all the repositories in your list to find ''. Below are instructions of how to add the repositories to your version of PPM.

Add PPM Repositories

PPM Version 3:The latest version of PPM now uses a different syntax to add repositories, so if using an older version see the next section.
Start your copy of PPM, either from the command line or via Start->Run and typing in PPM3. You should then get a nice command window (the DOS window)

To add new Repositories type
rep add [name]
[Location]
where
[name] is user define name for repositories and is Location URL of that repositories

Example :
PPM> rep add DevelopHelp http://ppd.develop-help.com/ppd/

PPM older versionsOlder versions of PPM use a different syntax to the current release.

PPM> set repository [name] [Location]
where
name is user define name for repositories and Location is URL of that repositories.

Example:
PPM> set repository DevelopHelp http://ppd.develop-help.com/ppd/

PPM> set save


Manage PPM Repositories
PPM Provide many commands to manage Repositories. Some are following.

rep delete Deletes specified repository
rep describe
Displays information about the specified repository
rep rename
Renames the specified repository to the given name
rep on
Activates the specified repository
rep off
Removes the repository from the active list
rep up
Moves the specified repository up one
rep down
Moves the specified repository down one

Note :

  • The needs to be put inside double quotes if it contains any spaces.
  • The *repository* (or *rep*) command controls two lists or repositories:
    1. The list of "active" repositories. This is the list of repositories used by *search*, *install*, and *upgrade*.
    2. The list of all known repositories. You can designate a repository "inactive", which means PPM will not use it in any commands.
  • If no arguments are given, the rep command will list the active repositories defined in the PPM settings.
  • The order is significant:
    • When searching, PPM merges the results of all the repositories together, so the order is less important (see the *search* command).
    • When installing a package, PPM will try the first repository, then thesecond, and so on, until it find the package you asked for.

Repositories Resources

Default Repository

Additional Repositories

Perl 5.10

Perl 5.8

My PPM has AS Servers:

Other 5.8 only:

May also work for 5.6:


Perl 5.6

Installing non-ActiveState modules:You can now access a larger number of PPM packaged modules, including mod_perl :
PPM> install mod_

2 comments:

  1. Hi,its a good thing that you are sharing your knowledge with us. Looking forward for more topics under Srijan.

    ReplyDelete