Cover image for Object oriented Perl
Title:
Object oriented Perl
Author:
Conway, Damian, 1964-
Personal Author:
Publication Information:
Greenwich, CT : Manning, [2000]

©2000
Physical Description:
xx, 490 pages : illustrations ; 24 cm
Language:
English
ISBN:
9781884777790
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Item Holds
Searching...
QA76.73.P22 C66 2000 Adult Non-Fiction Central Closed Stacks
Searching...

On Order

Summary

Summary

Techniques and tricks to master basic and advanced OO Perl for programmers who already have basic to intermediate skills in procedural Perl.


Author Notes

Based at Monash University in Melbourne, Australia, Dr Damian Conway is an effective teacher, an accomplished writer, and the author of several popular Perl modules. In 1998 he won the inaugural Larry Wall Award for Practical Utility.


Reviews 1

Library Journal Review

Originally designed as a simple scripting language, Perl is now a full-fledged object-oriented programming language. Conway's guide discusses for experienced Perl programmers object-oriented design concepts and how they work in Perl. For academic and larger public library computer science collections. (c) Copyright 2010. Library Journals LLC, a wholly owned subsidiary of Media Source, Inc. No redistribution permitted.


Table of Contents

Forewordp. xi
Prefacep. xii
Acknowledgmentsp. xviii
Author onlinep. xx
1 What you need to know first (an object-orientation primer)p. 1
1.1 The essentials of object orientationp. 2
1.2 Other object-oriented conceptsp. 13
1.3 Terminology: a few (too many) wordsp. 18
1.4 Where to find out morep. 18
1.5 Summaryp. 20
2 What you need to know second (a Perl refresher)p. 21
2.1 Essential Perlp. 21
2.2 Non-essential (but very useful) Perlp. 51
2.3 The CPANp. 65
2.4 Where to find out morep. 68
2.5 Summaryp. 72
3 Getting startedp. 73
3.1 Three little rulesp. 73
3.2 A simple Perl classp. 80
3.3 Making life easierp. 89
3.4 The creation and destruction of objectsp. 96
3.5 The CD::Music class, compleatp. 114
3.6 Summaryp. 117
4 Blessing arrays and scalarsp. 118
4.1 What's wrong with a hash?p. 118
4.2 Blessing an arrayp. 119
4.3 Blessing a pseudo-hashp. 126
4.4 Blessing a scalarp. 135
4.5 Summaryp. 142
5 Blessing other thingsp. 143
5.1 Blessing a regular expressionp. 143
5.2 Blessing a subroutinep. 151
5.3 Blessing a typeglobp. 158
5.4 Summaryp. 166
6 Inheritancep. 168
6.1 How Perl handles inheritancep. 168
6.2 Tricks and trapsp. 178
6.3 Example: Inheriting the CD classp. 193
6.4 Where to find out morep. 201
6.5 Summaryp. 202
7 Polymorphismp. 203
7.1 Polymorphism in Perlp. 203
7.2 Example: Polymorphic methods for the Lexer classp. 205
7.3 The simple pretty-printer objectifiedp. 208
7.4 Using interface polymorphism insteadp. 210
7.5 Where to find out morep. 212
7.6 Summaryp. 212
8 Automating class creationp. 213
8.1 The Class::Struct modulep. 213
8.2 The Class::MethodMaker modulep. 222
8.3 Where to find out morep. 234
8.4 Summaryp. 235
9 Tiesp. 236
9.1 A jacketing tie requiredp. 236
9.2 Tie-ing a scalarp. 238
9.3 Tie-ing a hashp. 243
9.4 Tie-ing an arrayp. 249
9.5 Tie-ing a filehandlep. 256
9.6 Inheriting from a tie'able packagep. 262
9.7 Tied variables as objectsp. 265
9.8 Where to find out morep. 274
9.9 Summaryp. 275
10 Operator overloadingp. 276
10.1 The problemp. 276
10.2 Perl's operator overloading mechanismp. 278
10.3 Example: A Roman numerals classp. 284
10.4 Circumventing undesired reference semanticsp. 291
10.5 The use and abuse of operatorsp. 292
10.6 Where to find out morep. 295
10.7 Summaryp. 295
11 Encapsulationp. 296
11.1 The perils of trustp. 296
11.2 Encapsulation via closuresp. 297
11.3 Encapsulation via scalarsp. 302
11.4 Encapsulation via tiesp. 309
11.5 Where to find out morep. 326
11.6 Summaryp. 326
12 Genericityp. 327
12.1 Why Perl doesn't need special generic mechanismsp. 327
12.2 Using specific mechanisms anywayp. 329
12.3 Implicit generics via polymorphismp. 336
12.4 Where to find out morep. 350
12.5 Summaryp. 350
13 Multiple dispatchp. 351
13.1 What is multiple dispatch?p. 351
13.2 Multiple dispatch via single dispatch and casesp. 353
13.3 Multiple dispatch via a tablep. 356
13.4 Comparing the two approachesp. 361
13.5 Dynamic dispatch tablesp. 363
13.6 Some lingering difficultiesp. 367
13.7 The Class::Multimethods modulep. 367
13.8 Comparing the three approachesp. 385
13.9 Where to find out morep. 385
13.10 Summaryp. 385
14 Persistent objectsp. 387
14.1 The ingredientsp. 387
14.2 Object-oriented persistencep. 398
14.3 Coarse-grained persistencep. 400
14.4 Fine-grained persistencep. 412
14.5 Where to find out morep. 427
14.6 Summaryp. 428
A Quick reference guidep. 429
B What you might know insteadp. 438
B.1 Perl and Smalltalkp. 438
B.2 Perl and C++p. 443
B.3 Perl and Javap. 449
B.4 Perl and Eiffelp. 454
Glossaryp. 459
Bibliographyp. 466
Indexp. 468