Skip to Content
Perl To Python Migration
book

Perl To Python Migration

by Martin C. Brown
November 2001
Beginner
320 pages
5h 53m
English
Pearson Business
Content preview from Perl To Python Migration

MODULES

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.

Python's approach

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Perl by Example

Perl by Example

Ellie Quigley
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 0201734885Purchase book