Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

Object Oriented Perl
Ajouter à une liste

Librairie Eyrolles - Paris 5e

Object Oriented Perl

Object Oriented Perl

Randal L. Schwartz, Damian Conway

490 pages, parution le 15/09/1999


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, leading them from the very simplest applications right up to 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 programmer.

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 will be available on-line.

Table of contents

  1. Introduction
    1. What is this book about?
    2. What is object-oriented Perl?
    3. Whom this book is for?
    4. Where to find what you're looking for?

  2. What You Need To Know First (An OO Primer)
    1. The essential elements of OO
      • Abstraction
      • Encapsulation
      • Inheritance
      • Polymorphism
    2. Other OO concepts
      • Genericity
      • Interface vs implementation
      • Class vs type
      • Persistence
    3. A few words about terminology
    4. Where to find out more

  3. What You Need To Know Second (A Perl Refresher)
    1. Essential Perl
      • Scalars
      • Arrays
      • Hashes
      • Subroutines
      • References
      • Packages
    2. Non-essential (but very useful) Perl
      • Modules
      • Autoloading
      • Closures
      • Typeglobs
    3. Where to find out more
      • Books
      • The Perl documentation
      • The Perl Journal
      • Perl on the WWW
      • Newsgroups

  4. Simple Object-Oriented Perl
    1. Three little rules
      • Rule 1: To create a class, build a package
      • Rule 2: To create a method, write a subroutine
      • Rule 3: To create an object, bless a referent
    2. A simple Perl class
      • The code
      • Using the CD::Music class
    3. Making life easier
      • Class modules
      • use strict and the -w flag
      • Automating data member access
      • Documenting a class
    4. Creation and destruction of objects
      • Constructors
      • Destructors
    5. The CD::Music class, compleat

  5. Blessing Variables
    1. What's wrong with a hash?
    2. Blessing an array
      • Reimplementing CD::Music
      • An array-specific example - iterators
      • Where to find out more
    3. Blessing a pseudo-hash
      • A pseudo-what???
      • Limitations of a pseudo-hash
      • Advantages of a pseudo-hash
      • The worst of both worlds?
      • Compile-time support for run-time performance
      • Just how Perl knows at compile-time that a particular variable is referring to a Transponder object, when the variable isn't assigned a value until run-time
      • Yet another version of CD::Music
      • Where to find out more
    4. Blessing a scalar
      • Why not bless a scalar?
      • An object-oriented password
      • A bit-string class
      • Where to find out more

  6. Blessing Other Things
    1. Blessing a regular expression
      • The qr operator
      • Why an OO regular expression class?
      • Designing a different regular expressions mechanism
      • A closer look at the two classes
      • On the separation of Search and State
      • Where to find out more
    2. Blessing a subroutine
      • So how can a subroutine be an object?
      • Why objectify a subroutine?
      • A lexer object
      • Example: A simple pretty-printer
      • Where to find out more
    3. Blessing a typeglob
      • Paging STDOUT
      • A multiprocess pager class
      • A threaded pager class
      • Where to find out more

  7. Inheritance
    1. How Perl handles inheritance
      • The @ISA array
      • What inheritance means in Perl
      • Where the call goes
      • Constructors and inheritance
      • Destructors and inheritance
    2. Tricks and Traps
      • Naming attributes of derived classes
      • The isa() subroutine
      • The can() subroutine
      • The UNIVERSAL package
      • The SUPER pseudo-package
      • Inheritance and pseudo-hashes
      • Issues related to accessing class data
    3. Example: Inheriting the CD class
      • Applied laziness
      • Class attributes revisited
      • An alternative solution

  8. Polymorphism
    1. Polymorphism in Perl
    2. Example: Polymorphic methods for the Lexer class
    3. The simple pretty-printer objectified
    4. Using interface polymorphism instead

  9. Automating class creation
    1. The Class::Struct module
    2. The Class::MethodMaker module

  10. Operator Overloading
    1. The problem
    2. Perl's operator overloading mechanism
    3. "Automagic" operators
    4. Fallback operations
    5. Specifying conversion operators
    6. Example: A Roman numerals class
    7. Creating class constants
    8. Circumventing undesired reference semantics
    9. The use and abuse of operators
    10. When to overload
    11. Where to find out more

  11. Ties
    1. Tie'ing a scalar
    2. Tie'ing an array
    3. Tie'ing a hash
    4. Tie'ing a filehandle
    5. Blessing and tie'ing to the same package

  12. Encapsulation
    1. The perils of trust
    2. Enforcing encapsulation via closures
    3. Enforcing encapsulation via scalars
    4. The Tie::SecureHash module
      • A limited-access hash
      • Constructing a securehash
      • Declaring securehash entries
      • Accessing securehash entries
      • Iterating a securehash
      • Ambiguous keys in a securehash
      • The formal access rules
      • Where to find out more
    5. Where to find out more

  13. Genericity
    1. Why Perl doesn't need special generic mechanisms
    2. Using special mechanisms anyway
    3. Implicit generics via polymorphism

  14. Multiple Dispatch
    1. What is multiple dispatch?
    2. Implementing multiple dispatch via single dispatch
    3. Implementing multiple disatch via a table
    4. The Class::Multimethods module
      • The problem(s)
      • Automating multimethods
      • Finding the "nearest" multimethod
      • Implications of the multimethod dispatch process
      • Defining multimethods outside their classes
      • Multimethods as regular subroutines
      • Non-class types as parameters
      • A final refinement - recursive multiple dispatch
      • Where to find out more
    5. Where to find out more

  15. Persistent Objects
    1. The ingredients
      • Identity
      • Encoding/serialization
      • Storage
      • Coordination
    2. Object-oriented persistence
      • Encoding objects
      • Object-oriented encoding
    3. Coarse-grained persistence
      • Class-specific persistence
      • Some improvements
      • Coarse-grained persistence for any data
      • Summing up
    4. Fine-grained persistence
      • Files as objects
      • Memory-mapped files as objects
      • Tied databases as objects
      • Fine-grained persistence for any class
      • Better persistence through genericity
      • Summing up
    5. Where to find out more

    Appendix B - What You Might Know Instead
    • From Smalltalk to Perl
    • From C++ to Perl
    • From Java to Perl
    • From Eiffel to Perl


L'auteur - Randal L. Schwartz

Randal L. Schwartz is a two-decade veteran of the software industry. He is skilled in software design, system administration, security, technical writing, and training. Randal has coauthored the "must-have" standards: Programming Perl, Learning Perl, Learning Perl for Win32 Systems, and Effective Perl Learning, and is a regular columnist for WebTechniques, PerformanceComputing, SysAdmin, and Linux magazines.

He is also a frequent contributor to the Perl newsgroups, and has moderated comp.lang.perl.announce since its inception. His offbeat humor and technical mastery have reached legendary proportions worldwide (but he probably started some of those legends himself). Randal's desire to give back to the Perl community inspired him to help create and provide initial funding for The Perl Institute. He is also a founding board member of the Perl Mongers (, the worldwide Perl grassroots advocacy organization. Since 1985, Randal has owned and operated Stonehenge Consulting Services, Inc. Randal can be reached for comment at or (503) 777-0095, and welcomes questions on Perl and other related topics.

L'auteur - Damian Conway

Damian Conway, surnommé le Monty Python de l'Open Source, est une figure majeure de la communauté Perl. Professeur, formateur, brillant orateur, il a écrit de nombreux modules Perl et a, entre autres, collaboré à Perl Journal. Damian a également été lauréat du prix Larry Wall en 1998 et 1999.

Caractéristiques techniques

Éditeur(s) Manning Publications
Auteur(s) Randal L. Schwartz, Damian Conway
Parution 15/09/1999
Nb. de pages 490
Format 18,8 x 23,5
Poids 850g
EAN13 9781884777790
ISBN13 978-1-884777-79-0


Livraison à partir de 0,01 en France métropolitaine
Paiement en ligne SÉCURISÉ
Livraison dans le monde
Retour sous 15 jours
+ d'un million et demi de livres disponibles
satisfait ou remboursé
Satisfait ou remboursé
Paiement sécurisé
modes de paiement
Paiement à l'expédition
partout dans le monde
Livraison partout dans le monde
Service clients
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.