Creating Perl projects from cpanfile or meta.json files

When you create or update a Perl custom runtime on the Platform, you now have the option to provide the package and version requirements for the project in cpanfile or meta.json file format. You can copy and paste the contents of an existing file, or type in your project’s requirements in the required format.

Creating new projects

To create a project from a cpanfile or meta.json file:

  1. Navigate to your organization and create a new project by clicking Set up a new runtime. You must choose Perl as the language.

  2. Click Import from META.json or cpanfile in the Requested Packages panel.

  3. Open the requirements.txt to use and copy and paste the content, or type in your requirements individually.

    cpanfile

  4. Click Import. The Platform parses each entry in your requirements list, validates the syntax, and identifies any issues. When the file is valid, the platform attempts to match each package requirement with a package and version available on the platform.

  5. If any errors or mismatches are identified between the requirements you have defined in your cpanfile or meta.json file and the package and versions available on the Platform, you may be able to adjust the package versions individually to create a valid build request.

  6. Click Commit Changes. In Requested Packages you will see each package listed, along with the requested version and the version selected by the Platform to fulfill the requirement.

  7. Click View Status to start the build and view the build progress. It may take some time for the build to succeed or fail, but you will receive an email notification when the build finishes.

  8. Once the build completes successfully, you have two options for accessing your build:

    1. You can download the installer(s) for your platform(s)
    2. Install and configure the new project using the State Tool.

Updating existing projects

To update an existing project using a cpanfile or meta.json file:

  1. Navigate to the Perl project you want to update.

  2. Click the Configuration tab.

  3. Click Import from META.json or cpanfile in the Requested Packages panel.

  4. Open the cpanfile or meta.json to use and copy and paste the content, or type in your requirements individually.

    cpanfile

  5. Click Import.