Perl module: Difference between revisions

Content deleted Content added
m re-link "namespace"
m rm link to disambiguation page (for "package")
Line 1:
A '''Perl module''' is a discrete component of software for the [[Perl]] programming language. Technically, it is a particular set of conventions for using Perl's [[#Perl packages and namespaces|package]] mechanism that has become universally adopted.{{discuss|Packages and modules}}
A module defines its source code to be in a ''package'' (much like a [[Java package]]'''), the Perl mechanism for defining [[Namespace (computer science)|namespaces]], e.g. ''CGI'' or ''Net::FTP'' or ''XML::Parser''; the file structure mirrors the namespace structure (e.g. the [[source code]] for ''Net::FTP'' is in ''Net/FTP.pm''). This mechanism is similar to that of [[Java package]]s. Furthermore, a module is the Perl equivalent of the [[class (computer science)|class]] when [[object-oriented programming]] is employed.{{discuss|Packages and modules}}
 
A collection of modules, with accompanying documentation, build scripts, and usually a test suite, compose a '''distribution'''. The Perl community has a sizable library of distributions available for search and download via [[CPAN]].