Learning Perl Objects, References, and Modules - Helion
ISBN: 978-14-493-6569-1
stron: 224, Format: ebook
Data wydania: 2003-06-09
Księgarnia: Helion
Cena książki: 101,15 zł (poprzednio: 128,04 zł)
Oszczędzasz: 21% (-26,89 zł)
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
Osoby które kupowały "Learning Perl Objects, References, and Modules", wybierały także:
- Hands-On Gradient Boosting with XGBoost and scikit-learn 142,38 zł, (29,90 zł -79%)
- Perl. Mistrzostwo w programowaniu 44,00 zł, (24,20 zł -45%)
- Wielkie umysły programowania. Jak myślą i pracują twórcy najważniejszych języków 79,00 zł, (47,40 zł -40%)
- Learning Perl. Making Easy Things Easy and Hard Things Possible. 7th Edition 169,00 zł, (118,30 zł -30%)
- 100 sposobów na Perl 39,00 zł, (29,25 zł -25%)
Spis treści
Learning Perl Objects, References, and Modules eBook -- spis treści
- Learning Perl Objects, References & Modules
- A Note Regarding Supplemental Files
- Foreword
- Preface
- Structure of This Book
- Conventions Used in This Book
- Comments and Questions
- Acknowledgments
- 1. Introduction
- What Should You Know Already?
- What About All Those Footnotes?
- Whats with the Exercises?
- What if Im a Perl Course Instructor?
- 2. Building Larger Programs
- The Cure for the Common Code
- Inserting Code with eval
- Using do
- Using require
- require and @INC
- Extending @INC
- Extending @INC with PERL5LIB
- Extending @INC with -I
- The Problem of Namespace Collisions
- Packages as Namespace Separators
- Scope of a Package Directive
- Packages and Lexicals
- Exercises
- Exercise 1 [30 min]
- Exercise 2 [10 min]
- 3. Introduction to References
- Performing the Same Task on Many Arrays
- Taking a Reference to an Array
- Dereferencing the Array Reference
- Dropping Those Braces
- Modifying the Array
- Nested Data Structures
- Simplifying Nested Element References with Arrows
- References to Hashes
- Exercises
- Exercise 1 [5 min]
- Exercise 2 [30 min]
- 4. References and Scoping
- More than One Reference to Data
- What if That Was the Name?
- Reference Counting and Nested Data Structures
- When Reference Counting Goes Bad
- Creating an Anonymous Array Directly
- Creating an Anonymous Hash
- Autovivification
- Autovivification and Hashes
- Exercises
- Exercise 1 [5 min]
- Exercise 2 [30 min]
- 5. Manipulating Complex Data Structures
- Using the Debugger to View Complex Data
- Viewing Complex Data with Data::Dumper
- Storing Complex Data with Storable
- The map and grep Operators
- Using map
- Applying a Bit of Indirection
- Selecting and Altering Complex Data
- Exercises
- Exercise 1 [20 min]
- Exercise 2 [5 min]
- 6. Subroutine References
- Referencing a Named Subroutine
- Anonymous Subroutines
- Callbacks
- Closures
- Returning a Subroutine from a Subroutine
- Closure Variables as Inputs
- Closure Variables as Static Local Variables
- Exercise
- Exercise [30 min]
- 7. Practical Reference Tricks
- Review of Sorting
- Sorting with Indices
- Sorting Efficiently
- The Schwartzian Transform
- Recursively Defined Data
- Building Recursively Defined Data
- Displaying Recursively Defined Data
- Exercises
- Exercise 1 [15 min]
- Exercise 2 [15 min]
- Exercise 3 [10 min]
- Exercise 4 [20 min]
- 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
- Exercise 1 [20 min]
- Exercise 2 [40 min]
- 9. Objects with Data
- A Horse Is a Horse, of Course of Courseor 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
- Dont Look Inside the Box
- Faster Getters and Setters
- Getters That Double as Setters
- Restricting a Method to Class-Only or Instance-Only
- Exercise
- Exercise [45 min]
- 10. Object Destruction
- Nested Object Destruction
- Beating a Dead Horse
- Indirect Object Notation
- Additional Instance Variables in Subclasses
- Using Class Variables
- Weakening the Argument
- Exercise
- Exercise [45 min]
- 11. Some Advanced Object Topics
- UNIVERSAL Methods
- Testing Your Objects for Good Behavior
- AUTOLOAD as a Last Resort
- Using AUTOLOAD for Accessors
- Creating Getters and Setters More Easily
- Multiple Inheritance
- References to Filehandles
- Exercise
- Exercise [30 min]
- 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
- Exercise [15 min]
- 13. Writing a Distribution
- Starting with h2xs
- Looking at the Templates
- The Prototype Module Itself
- Embedded Documentation
- Controlling the Distribution with Makefile.PL
- Alternate Installation Locations (PREFIX=...)
- Trivial make test
- Trivial make install
- Trivial make dist
- Using the Alternate Library Location
- Exercise
- Exercise [30 min]
- 14. Essential Testing
- What the Test Harness Does
- Writing Tests with Test::Simple
- Writing Tests with Test::More
- Conditional Tests
- More Complex Tests (Multiple Test Scripts)
- Testing Things That Write to STDOUT and STDERR
- Exercise
- Exercise [60 min]
- 15. Contributing to CPAN
- The Comprehensive Perl Archive Network
- Getting Prepared
- Preparing Your Distribution
- Uploading Your Distribution
- Announcing the Module
- Testing on Multiple Platforms
- Consider Writing an Article or Giving a Talk
- Exercise
- Exercise
- A. Answers to Exercises
- Answers for Chapter 2
- Exercise 1 (Exercise 1 [30 min])
- Exercise 2 (Exercise 2 [10 min])
- Answers for Chapter 3
- Exercise 1 (Exercise 1 [5 min])
- Exercise 2 (Exercise 2 [30 min])
- Answers for Chapter 4
- Exercise 1 (Exercise 1 [5 min])
- Exercise 2 (Exercise 2 [30 min])
- Answers for Chapter 5
- Exercise 1 (Exercise 1 [20 min])
- Exercise 2 (Exercise 2 [5 min])
- Answer for Chapter 6
- Exercise (Exercise [30 min])
- Answers for Chapter 7
- Exercise 1 (Exercise 1 [15 min])
- Exercise 2 (Exercise 2 [15 min])
- Exercise 3 (Exercise 3 [10 min])
- Exercise 4 (Exercise 4 [20 min])
- Answers for Chapter 8
- Exercise 1 (Exercise 1 [20 min])
- Exercise 2 (Exercise 2 [40 min])
- Answer for Chapter 9
- Exercise (Exercise [45 min])
- Answer for Chapter 10
- Exercise (Exercise [45 min])
- Answer for Chapter 11
- Exercise (Exercise [30 min])
- Answer for Chapter 12
- Exercise (Exercise [15 min])
- Answers for Chapters 13-15
- Answers for Chapter 2
- Index
- About the Authors
- Colophon
- Copyright