November 2001
Beginner
320 pages
5h 53m
English
In Perl, modules have been the main way to extend code and make the code reusable. They have also become the primary way of supporting object classes and inheritance. However, to create a proper Perl module that supports both entire and selective export of functions and variables you must place the functions or class definitions into a special file and add suitable header information. Without this information it's impossible for Perl to explicitly export entities correctly, or to support the class inheritance system.
In theory every Python script you create has the potential to be a module – unlike Perl, you do not need to explicitly create a Python module, you can import the contents from a file automatically into its ...