Perl Package Manager (PPM) has been replaced with the ActiveState Platform and its Command Line Interface (CLI), the State Tool, where:
- The ActiveState Platform provides a catalog of buildable modules, and performs the build (including linked C libraries) for you.
- The State Tool allows you to manage the modules/dependencies in your environment.
If you are a Windows or Linux user (macOS is not supported at this time), you will need to create a virtual environment that contains your Perl environment, as well as all of the dependencies you require.
To get started
-
Download the State Tool and run
state auth
to create an ActiveState Platform account (or login if you have an account). -
Create an ActiveState Platform project locally by typing:
state init <my_org>/<project_name> --language=perl[version]
Where:
-
my_org
is the name you provided during account creation -
project_name
is the name of the project to create -
[version]
can be:- 5.28.1
- 5.26.3
- 5.26.2
- 5.24.3
- 5.22.4
- 5.20.3
- 5.18.4
- 5.16.3
-
-
Follow the instructions on screen, and then switch to the directory where the project is initialized. For example:
cd my_org/project_name
-
Run
state push
to sync your local project with the ActiveState Platform -
You can now add dependencies by typing:
state packages import file
, wherefile
can be a cpanfile or meta.json fileTip: add all of the new dependencies you require to your cpanfile/meta.json file before importing.
-
The ActiveState Platform will build all of the dependencies in your Perl environment, including linked C libraries. You will receive an email notification when it’s done.
Tip: you can also check the progress of the build by pointing your browser at the ActiveState Platform’s distributions page for your project:
https://platform.activestate.com/<myorg>/<my-project-name>/distributions
-
Run
state pull
to sync your local project with the Platform’s build. Your Perl environment will be downloaded and installed in your local project directory. -
To start working with your Perl environment run:
state activate my_org/project_name
From this point, to add a dependency to your environment you need only run:
state packages add <name[@version]>
And after you receive the email notification that the build is complete, run:
state pull
For more information on working with the State Tool, refer to the documentation.