Pure Programmer
Blue Matrix


Cluster Map

Dependency Management

L1

This page is under construction. Please come back later.

It is often easier to write programs when you don't have to write all the code from scratch. There are a large number of code libraries available, both open source (free) and commercial (paid). Using code libraries written by the community or commercial developers give you a leg up in your coding efforts by making a large library of useful functions and classes available to your program. All we need to do is manage these dependencies and include them in our programs.

Since Perl is an interpreted language, all you need to do to use pre-written code is to download the .pm Perl module file, put it in your project folder and then include it in your program.

An easier way is to use the [[Comprehensive Perl Archive Network (CPAN)]] software that comes with Perl to download and install libraries for you. The community maintains a large online library of modules that you can access using CPAN. Given the name of a module such as DateTime::Locale, you can download it and install it in one step from the command line:

$ sudo CPAN install DateTime::Locale

You will want to download the [[Pure Programmer Perl Utils Module]] which is needed by some examples and project. Simply put the Utils.pm file in the same folder as your program. Then add a use statement to the beginning of your source file:

use Utils;
Using Perl Modules

References