In the Perl world there is a great thing called CPAN. It is a big storage for open source Perl libraries.
I use modules from CPAN and I have released several distributions myself.
I use CPAN, but there is one essential thing that I don't understand. I don't know what words are used for the different things on CPAN. In the beginning of this post I have used the words libraries
, modules
, distributions
, but I'm not sure that I have used them correctly.
Can you please explain what each of this words means in case of CPAN (if they can be used in the scope of CPAN):
All of these terms have "flexible" definitions, even in a Perl context. In a Perl context, they most commonly mean the following:
module
A file providing functions to be called by other files or a class to be used by other files.
It will have the .pm
extension. It will have a package
directive. It will usually be loaded using use
. etc
Example: XML/LibXML.pm
package
A directive that instructs Perl into which namespace to place symbols. It's also used as a synonym for "namespace".
Example: XML::LibXML
distribution
A collection of modules including an installer. What is found on CPAN.
Example: XML-LibXML
library
Not part of Perl jargon, except perhaps when indicating a distribution provides an interface to a C library. In C, it refers to a collection of functions and symbols which can be accessed by other objects and executables.
Example: libxml2
release
A specific version of something.
Example: XML-LibXML-2.0104.tar.gz
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With