Book description
Perl is a versatile, powerful programming language used in a variety of disciplines, ranging from system administration to web programming to database manipulation. One slogan of Perl is that it makes easy things easy and hard things possible. This book is about making the leap from the easy things to the hard ones.Learning Perl Objects, References & Modules offers a gentle but thorough introduction to advanced programming in Perl. Written by the authors of the best-selling Learning Perl, this book picks up where that book left off. Topics include:
- Packages and namespaces
- References and scoping
- Manipulating complex data structures
- Object-oriented programming
- Writing and using modules
- Contributing to CPAN
Table of contents
- Learning Perl Objects, References & Modules
- A Note Regarding Supplemental Files
- Foreword
- Preface
- 1. Introduction
- 2. Building Larger Programs
- 3. Introduction to References
- 4. References and Scoping
- 5. Manipulating Complex Data Structures
- 6. Subroutine References
- 7. Practical Reference Tricks
-
8. Introduction to Objects
- If We Could Talk to the Animals...
- Introducing the Method Invocation Arrow
- The Extra Parameter of Method Invocation
- Calling a Second Method to Simplify Things
- A Few Notes About @ISA
- Overriding the Methods
- Starting the Search from a Different Place
- The SUPER Way of Doing Things
- What to Do with @_
- Where We Are So Far...
- Exercises
-
9. Objects with Data
- A Horse Is a Horse, of Course of Course—or Is It?
- Invoking an Instance Method
- Accessing the Instance Data
- How to Build a Horse
- Inheriting the Constructor
- Making a Method Work with Either Classes or Instances
- Adding Parameters to a Method
- More Interesting Instances
- A Horse of a Different Color
- Getting Your Deposit Back
- Don’t Look Inside the Box
- Faster Getters and Setters
- Getters That Double as Setters
- Restricting a Method to Class-Only or Instance-Only
- Exercise
- 10. Object Destruction
- 11. Some Advanced Object Topics
-
12. Using Modules
- Sample Function-Oriented Interface: File::Basename
- Selecting What to Import
- Sample Object-Oriented Interface: File::Spec
- A More Typical Object-Oriented Module: Math::BigInt
- The Differences Between OO and Non-OO Modules
- What use Is Doing
- Setting the Path at the Right Time
- Importing with Exporter
- @EXPORT and @EXPORT_OK
- Exporting in a Primarily OO Module
- Custom Import Routines
- Exercise
- 13. Writing a Distribution
- 14. Essential Testing
- 15. Contributing to CPAN
- A. Answers to Exercises
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Learning Perl Objects, References, and Modules
- Author(s):
- Release date: June 2003
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596004781
You might also like
book
Advanced Perl Programming
So you've learned Perl, but you're getting frustrated. Perhaps you've taken on a larger project than …
book
Kubernetes in Action
Kubernetes in Action teaches you to use Kubernetes to deploy container-based distributed applications. You'll start with …
book
How Linux Works, 2nd Edition
The "hows" and "whys" of How Linux Works: for administrators, programmers, and enthusiasts who want to …
book
C++ Concurrency in Action, Second Edition
C++ Concurrency in Action, Second Edition is the definitive guide to writing elegant multithreaded applications in …