27.1. Introduction to Perl Modules

The Perl programming language has many of its functions in separate modules, which are loaded only when they need them by Perl scripts. The standard distribution of Perl includes many modules, but there are far more available that can be installed separately. Modules exist for a wide variety of purposes, such as connecting to databases, creating images, using network protocols, and parsing data formats.

All Perl modules have short names like GD or Net::Telnet. All those that have multi-part names separated by double-colons are part of a family of related modules, which are often packaged together. Modules are distributed in tar.gz files which need to be extracted and compiled before they can be installed. Often, a single distribution file will contain multiple modules that must all be installed together.

The best source of Perl modules is CPAN (the Comprehensive Perl Archive Network), located at www.cpan.org/. It has a vast database of almost every third-party module available, and is easily searchable. Webmin can install a Perl module for you directly from CPAN if you know the name of the module that you want.

Because Webmin is itself written in Perl, it can make use of some optional modules. For example, to run Webmin in SSL mode (as explained in Chapter 2), it is necessary to install the Net::SSLeay module. To reliably connect to and manage MySQL and PostgreSQL databases, you need to install the DBD::mysql and DBD:Pg modules, respectively.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.234.24