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. Intermediate Perl is about making the leap from the easy things to the hard ones.
Originally released in 2003 as Learning Perl Objects, References, and Modules and revised and updated for Perl 5.8, this book offers a gentle but thorough introduction to intermediate programming in Perl. Written by the authors of the best-selling Learning Perl, it 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
- Testing Perl code
- Contributing to CPAN
Following the successful format of Learning Perl, we designed each chapter in the book to be small enough to be read in just an hour or two, ending with a series of exercises to help you practice what you've learned. To use the book, you just need to be familiar with the material in Learning Perl and have ambition to go further.
Perl is a different language to different people. It is a quick scripting tool for some, and a fully-featured object-oriented language for others. It is used for everything from performing quick global replacements on text files, to crunching huge, complex sets of scientific data that take weeks to process. Perl is what you make of it. But regardless of what you use Perl for, this book helps you do it more effectively, efficiently, and elegantly.
Intermediate Perl is about learning to use Perl as a programming language, and not just a scripting language. This is the book that turns the Perl dabbler into the Perl programmer.
Publisher resources
Table of contents
- A Note Regarding Supplemental Files
- Foreword
- Preface
- 1. Introduction
- 2. Intermediate Foundations
-
3. Using Modules
- 3.1. The Standard Distribution
- 3.2. Using Modules
- 3.3. Functional Interfaces
- 3.4. Selecting What to Import
- 3.5. Object-Oriented Interfaces
- 3.6. A More Typical Object-Oriented Module: Math::BigInt
- 3.7. The Comprehensive Perl Archive Network
- 3.8. Installing Modules from CPAN
- 3.9. Setting the Path at the Right Time
- 3.10. Exercises
- 4. Introduction to References
-
5. References and Scoping
- 5.1. More Than One Reference to Data
- 5.2. What If That Was the Name?
- 5.3. Reference Counting and Nested Data Structures
- 5.4. When Reference Counting Goes Bad
- 5.5. Creating an Anonymous Array Directly
- 5.6. Creating an Anonymous Hash
- 5.7. Autovivification
- 5.8. Autovivification and Hashes
- 5.9. Exercises
- 6. Manipulating Complex Data Structures
- 7. Subroutine References
- 8. Filehandle References
- 9. Practical Reference Tricks
- 10. Building Larger Programs
-
11. Introduction to Objects
- 11.1. If We Could Talk to the Animals...
- 11.2. Introducing the Method Invocation Arrow
- 11.3. The Extra Parameter of Method Invocation
- 11.4. Calling a Second Method to Simplify Things
- 11.5. A Few Notes About @ISA
- 11.6. Overriding the Methods
- 11.7. Starting the Search from a Different Place
- 11.8. The SUPER Way of Doing Things
- 11.9. What to Do with @_
- 11.10. Where We Are So Far...
- 11.11. Exercises
-
12. Objects with Data
- 12.1. A Horse Is a Horse, of Course of Course—or Is It?
- 12.2. Invoking an Instance Method
- 12.3. Accessing the Instance Data
- 12.4. How to Build a Horse
- 12.5. Inheriting the Constructor
- 12.6. Making a Method Work with Either Classes or Instances
- 12.7. Adding Parameters to a Method
- 12.8. More Interesting Instances
- 12.9. A Horse of a Different Color
- 12.10. Getting Our Deposit Back
- 12.11. Don’t Look Inside the Box
- 12.12. Faster Getters and Setters
- 12.13. Getters That Double as Setters
- 12.14. Restricting a Method to Class-Only or Instance-Only
- 12.15. Exercise
- 13. Object Destruction
- 14. Some Advanced Object Topics
- 15. Exporter
-
16. Writing a Distribution
- 16.1. There’s More Than One Way To Do It
- 16.2. Using h2xs
- 16.3. Embedded Documentation
- 16.4. Controlling the Distribution with Makefile.PL
- 16.5. Alternate Installation Locations (PREFIX=...)
- 16.6. Trivial make test
- 16.7. Trivial make install
- 16.8. Trivial make dist
- 16.9. Using the Alternate Library Location
- 16.10. Exercise
- 17. Essential Testing
- 18. Advanced Testing
- 19. Contributing to CPAN
-
A. Answers to Exercises
- A.1. Answers for Chapter 2
- A.2. Answers for Chapter 3
- A.3. Answers for Chapter 4
- A.4. Answers for Chapter 5
- A.5. Answers for Chapter 6
- A.6. Answer for Chapter 7
- A.7. Answers for Chapter 8
- A.8. Answers for Chapter 9
- A.9. Answers for Chapter 10
- A.10. Answers for Chapter 11
- A.11. Answer for Chapter 12
- A.12. Answer for Chapter 13
- A.13. Answers for Chapter 14
- A.14. Answers for Chapter 15
- A.15. Answer for Chapter 16
- A.16. Answer for Chapter 17
- A.17. Answers for Chapter 18
- A.18. Answer for Chapter 19
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Intermediate Perl
- Author(s):
- Release date: March 2006
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596102067
You might also like
book
Perl & LWP
Perl soared to popularity as a language for creating and managing web content, but with LWP …
book
Advanced Perl Programming
So you've learned Perl, but you're getting frustrated. Perhaps you've taken on a larger project than …
book
Beginning Perl
Everything beginners need to start programming with Perl Perl is the ever-popular, flexible, open source programming …
book
Learning Perl 6
f you’re ready to get started with Raku (formerly Perl 6), this is the book you …