Manning Logo
Home | Ordering Info | Shopping Cart | Manage My Account | Login
Attention customers: online shopping is now available exclusively through our main website: http://www.manning.com. Thank you.
Object Oriented Perl

Inside the book

Sample Chapters Table of Contents Cyberdigest Errata Index Preface & Thanks Reviews Source Code Author Online

Manning Blog

Why small is sweet?

Author Blogs

Dave Crane more...

Author Calendar

Upcoming Events

Catalog

Java .NET Perl XML All by Subject All by Title

About...

Manning Contact Us Ordering FAQs ebooks Covers Sandbox Forums Distributors Manning Early Access Program (MEAP) Affiliate Program Academia/Publicity User Group Program Press Releases Jobs

Manning Publications Co.
209 Bruce Park Avenue
Greenwich, CT 06830

Object Oriented Perl
Damian Conway

Foreword by Randal L. Schwartz

1999 | 512 pages
ISBN: 1884777791

  $42.95 Softbound print book Out of Stock (?)
$21.50 PDF ebook  

Table of Contents

foreword xi
preface xii
acknowledgments xviii
author online xx

1 What you need to know first (an object-orientation primer) 1

1.1 The essentials of object orientation 2
1.2 Other object-oriented concepts 13
1.3 Terminology: a few (too many) words 18
1.4 Where to find out more 18
1.5 Summary 20

2 What you need to know second (a Perl refresher) 21

2.1 Essential Perl 21
2.2 Non-essential (but very useful) Perl 51
2.3 The CPAN 65
2.4 Where to find out more 68
2.5 Summary 72

3 Getting started 73

3.1 Three little rules 73
3.2 A simple Perl class 80
3.3 Making life easier 89
3.4 The creation and destruction of objects 96
3.5 The CD::Music class, compleat 114
3.6 Summary 117

4 Blessing arrays and scalars 118

4.1 What's wrong with a hash? 118
4.2 Blessing an array 119
4.3 Blessing a pseudo-hash 126
4.4 Blessing a scalar 135
4.5 Summary 142

5 Blessing other things 143

5.1 Blessing a regular expression 143
5.2 Blessing a subroutine 151
5.3 Blessing a typeglob 158
5.4 Summary 166

6 Inheritance 168

6.1 How Perl handles inheritance 168
6.2 Tricks and traps 178
6.3 Example: Inheriting the CD class 193
6.4 Where to find out more 201
6.5 Summary 202

7 Polymorphism 203

7.1 Polymorphism in Perl 203
7.2 Example: Polymorphic methods for the Lexer class 205
7.3 The simple pretty-printer objectified 208
7.4 Using interface polymorphism instead 210
7.5 Where to find out more 212
7.6 Summary 212

8 Automating class creation 213

8.1 The Class::Struct module 213
8.2 The Class::MethodMaker module 222
8.3 Where to find out more 234
8.4 Summary 235

9 Ties 236

9.1 A jacketing tie required 236
9.2 Tie-ing a scalar 238
9.3 Tie-ing a hash 243
9.4 Tie-ing an array 249
9.5 Tie-ing a filehandle 256
9.6 Inheriting from a tie'able package 262
9.7 Tied variables as objects 265
9.8 Where to find out more 274
9.9 Summary 275

10 Operator overloading 276

10.1 The problem 276
10.2 Perl's operator overloading mechanism 278
10.3 Example: A Roman numerals class 284
10.4 Circumventing undesired reference semantics 291
10.5 The use and abuse of operators 292
10.6 Where to find out more 295
10.7 Summary 295

11 Encapsulation 296

11.1 The perils of trust 296
11.2 Encapsulation via closures 297
11.3 Encapsulation via scalars 302
11.4 Encapsulation via ties 309
11.5 Where to find out more 326
11.6 Summary 326

12 Genericity 327

12.1 Why Perl doesn't need special generic mechanisms 327
12.2 Using specific mechanisms anyway 329
12.3 Implicit generics via polymorphism 336
12.4 Where to find out more 350
12.5 Summary 350

13 Multiple dispatch 351

13.1 What is multiple dispatch? 351
13.2 Multiple dispatch via single dispatch and cases 353
13.3 Multiple dispatch via a table 356
13.4 Comparing the two approaches 361
13.5 Dynamic dispatch tables 363
13.6 Some lingering difficulties 367
13.7 The Class::Multimethods module 367
13.8 Comparing the three approaches 385
13.9 Where to find out more 385
13.10 Summary 385

14 Persistent objects 387

14.1 The ingredients 387
14.2 Object-oriented persistence 398
14.3 Coarse-grained persistence 400
14.4 Fine-grained persistence 412
14.5 Where to find out more 427
14.6 Summary 428

Appendix A Quick reference guide 429

Appendix B What you might know instead 438

B.1 Perl and Smalltalk 438
B.1 Perl and C++ 443
B.2 Perl and Java 449
B.3 Perl and Eiffel 454
glossary 459
bibliography 466
index 468

DESCRIPTION

Object Oriented Perl is designed to provide anyone who is familiar with the basics of regular Perl programming with a complete introduction to the object-oriented features of Perl. The book moves from the very simplest applications through advanced applications such as generic programming, multiple dispatch, and object-oriented persistence. Thus, it offers a much-needed resource for persons new to Perl, as well as new and valuable insights and techniques for even the most accomplished Perl programmers.

Beyond explaining the syntax and semantics of Perl's inbuilt object-oriented features, Object Oriented Perl explains how to apply those features in a wide range of programming techniques. Each technique is illustrated with complete examples.

Object Oriented Perl also discusses the latest relevant Perl modules, which are freely available and can greatly simplify object-oriented development in Perl. In particular, it examines the new standard "fields" module and the associated pseudo-hash construct.

No other book covers the topic of object-oriented software development in Perl in such breadth, to such depth, or in such a readable manner. Complete source code for Object Oriented Perl is available online to owners of the book.

Translation rights for Object Oriented Perl have been granted for Korea, Japan, India, and Germany. If you are interested in learning where to buy this book in a language other than English, please inquire at your local bookseller.

WHAT THE READERS SAY ABOUT THIS BOOK...

"...a serious book on an important topic that is usually relegated to a chapter in the back of most Perl books. You don't find this kind of honesty in books created by large software publishers."
--Reviews Online
--http://reviewsonline.com/OOPERL.htm

ABOUT THE AUTHOR...

Damian Conway holds a Ph.D. in Computer Science and is currently a Senior Lecturer in Computer Science and Software Engineering at Monash University in Melbourne, Australia. He has written numerous technical and scientific papers, as well as a textbook on advanced object-oriented techniques in C++. He is the author of numerous popular Perl modules, including: Parse::RecDescent, Text::Balanced, Getopt::Declare, Lingua::EN::Inflect, Tie::SecureHash, and Class::Multimethod (available from your local CPAN mirror).

Damian Conway is one of the most active members of the Perl community and has just been named the recipient of the first ever YAS Perl DevelopmentGrant awarded by Yet Another Society, which will allow him to entirely devote the next year to writing and lecturing on Perl and working on related projects. He is a highly sought presenter at Perl conferences, is a contributor to the Perl Journal and is the three-time winner of the annual Larry Wall award for Practical Utility.

Home | Catalog | Privacy Policy | About Manning

© 2003-2006 Manning Publications Co.