How to add a CPAN module to Krang

This document describes how to add a new CPAN module to Krang, or update an existing one. You might need to add a CPAN module when you're adding new functionality to Krang. Updating an existing module is usually done to fix bugs or add new functionality.

Follow these steps to add a new module:

  1. First, collect two pieces of information about the module: its license and what other modules it requires. If the module does not have a license, or the license does not allow free distribution do not add it to Krang. Ensure that any required modules are already in Krang. If not, add them as well.

  2. Edit docs/cpan_inventory.pod, adding a section for the module listing its version and license. If you are upgrading the module, just edit the relevent section.

  3. Copy the module distribution into the src/ directory of Krang. This can be either a CVS checkout of Krang or a source distribution (ex: krang-1.011-src.tar.gz).

  4. Attempt to rebuild Krang:
      make build

    If this completes successfully then the module is now installed into Krang. Run tests and commit your changes if everything passes.

  5. If step 4 failed you may need to modify Krang::Plaftorm::build_perl_module() to successfully build the new module. If the module asks any questions during build then you'll need to modify the Expect calls to provide the appropriate answers.