How To Install Perl Modules

Table of contents:

How To Install Perl Modules
How To Install Perl Modules

Video: How To Install Perl Modules

Video: How To Install Perl Modules
Video: Perl - Installing CPAN Modules 2024, December
Anonim

One of the important advantages of the Perl programming language is the availability of ready-made modules (libraries) that greatly facilitate the work of the programmer. Modules are easily installed via another CPAN library or via the ActivePerl package manager.

How to install Perl modules
How to install Perl modules

Instructions

Step 1

The CPAN module is designed to work with extension catalogs and allows you to automatically download appropriate packages and dependencies, cache downloaded data, check for updates, etc. To install a module from under Unux, enter the following line on the command line (if you are using a graphical shell, use the Terminal program in the Standard application section): perl –MCPAN –e 'install' This command means the same as regular perl script with lines: use CPAN; install (‘module name’)

Step 2

The system automatically checks all dependencies, installs new required versions and requests configuration.

Step 3

ActivePerl also has its own package manager, called ppm, which is launched with the following command: c_perl_dir inppm.bat After running this file, a console will appear where you can enter the appropriate instructions for installing the install module or removing remove. All libraries are downloaded from the ActivePerl site.

Step 4

Switch to the command line mode (for Windows - "Start" - "All programs" - "Accessories" - "Command line") and enter the request: ppm install https:// full_address _to_module / module.ppd

Step 5

If you are using Linux, download the required module in.tar.gz format and unpack the contents of the archive into the required directory and change to the directory with the downloaded module in the Terminal: cd path_to_unpacked_folder Then specify the command: perl makefile.plmake && make test && make install

Recommended: