Perl Modules

book cover thumbnail image of Perl Modules
  • by Eric Foster-Johnson
  • ISBN: 978-1558515703
  • March 1998
  • A Japanese version was published by Shoeisha
  • This book is out of print but may be available from used
    and out of print book sellers

Other Editions

book cover thumbnail image of TITLE OF BOOK


Once you've learned the basics of Perl, it's time to start making effective use of Perl's many add-on modules, as well as writing your own.

Perl is one of the most widely used scripting languages that runs on many platforms, including Windows and Unix. A Perl module is a set of related Perl add-on functions, packaged together and released as a unit. Smart Perl coders make extensive use of Perl modules to save time and acquire a lot of Perl functionality for free. As you read this book, you'll be surprised at the incredible amounts of Perl code available—all for free.

This book covers how to use the many existing Perl freeware add-on modules and how to write your own. As such, it's an intermediate to advanced Perl book, concentrating on code reuse and taking advantage of the great many freeware modules out there.

Written as a follow up to the popular Perl beginner's guide, Cross Platform Perl, this book helps you take even more advantage of the features offered by Perl.

Filled with practical, hands-on examples, Perl Modules provides three parts: how to take advantage of Perl's modules, a guide to the most useful modules available, and a step-by-step tutorial on how to write your own modules.

I want to express very heartfelt thanks to Tom Grydeland, whose valuable help, suggestions, and comments made this a much better book. ~ Eric

Table of Contents

  • Preface
  • Section I: Object-Oriented Perl
  • Chapter 1: Perl
  • Chapter 2: Object-Oriented Perl with Modules
  • Section II: Using Modules
  • Chapter 3: Using Perl Modules
  • Chapter 4: Graphics
  • Chapter 5: The World Wide Web
  • Chapter 6: Networking and Electronic Mail
  • Chapter 7: Windows Modules
  • Chapter 8: Databases
  • Section III: Writing Modules
  • Chapter 9: Delving Into Modules
  • Chapter 10: Debugging Modules
  • Chapter 11: Documenting Modules
  • Chapter 12: Installing Modules
  • Chapter 13: Distributing Modules
  • Appendix A: For More Information
  • Appendix B: Installing Perl

Errata for Perl Modules

The following typos have been found in the book. Thanks to Syunji Mishima-san and Tom Grydeland.

Page Errata & Corrections
29 Code Example
The dashes in the script run together. The last print statement really should appear as follows:

print "-- Inside my_subroutine --\n";
30 Code Output
The code output has the same dash issue. It should appear as:

-- Inside my_subroutine --
31 2nd Paragraph
In my effort to briefly explain local and my, I ended up making things more confusing. The second paragraph mentions local making local variables. Of course, it does not. Further down in the page, the description clarifies matters.
43 Top of Page
The parenthesis should close at the end of the first (partial) sentence, not at the end of the second sentence.
44 2nd Listing from Bottom of Page
The following line has a typo:

$keys = keys( %$has_reference );

This should really be %$hash_reference:

$keys = keys( %$hash_reference );
185 Table 7-1
The entry reading Win32::Win32 is incorrect. It should read just Win32.
208 Perl Modules and Functions Introduced in This Chapter
Win 32::Internet should really be Win32::Internet (with no space).
303 script
While the MySub bareword will pass the use stricts test, it's not a very good example, as $sub_ref2 contains the return value from the print in MySub; most likely '1'. This is not something likely to be useful as a subroutine reference.

Purchase Options

I'm sorry. This book is out of print but may be available from used and out of print book sellers.