Tous nos rayons

Déjà client ? Identifiez-vous

Mot de passe oublié ?

Nouveau client ?

CRÉER VOTRE COMPTE
Effective Perl programming
Ajouter à une liste

Librairie Eyrolles - Paris 5e
Indisponible

Effective Perl programming

Effective Perl programming

Writing better programs with Perl

Joseph N. Hall, Randal L. Schwartz - Collection A-W developers press

256 pages, parution le 31/01/1998

Résumé

As the base of Perl programmers expands, there is an increasing need for more advanced information about how to write the most effective Perl scripts. This text shows, in 60 direct lessons, how to tackle and solve common programming obstacles, aiming to produce a more efficient and adept Perl programmer. It covers Version 5 and includes information and useful examples about the structure, functions and capabilities of the language, such as self-documenting object-oriented modules.

Table of contents :
Foreword ..... ix
Preface ..... xi
Acknowledgements ..... xiii
Introduction ..... 1
Basics ..... 9
Item 1: Know your namespaces ..... 9
Item 2: Avoid using a slice when you want an element. ..... 11
Item 3: Don't assign undef when you want an empty list. ..... 15
Item 4: String and numeric comparisons are different. ..... 17
Item 5: Remember that 0 and "" are false. ..... 18
Item 6: Understand conversions between strings and numbers. ..... 19
Idiomatic Perl ..... 23
Item 7: Use $_ for elegance. ..... 26
Item 8: Know the other default arguments: @_, @ARGV, STDIN. ..... 27
Item 9: Know common shorthands and syntax quirks. ..... 29
Item 10: Avoid excessive punctuation. ..... 34
Item 11: Consider different ways of reading from a stream. ..... 35
Item 12: Use foreach, map and grep as appropriate. ..... 37
Item 13: Don't misquote. ..... 41
Item 14: Learn the myriad ways of sorting. ..... 43
Regular Expressions ..... 51
Item 15: Know the precedence of regular expression operators. ..... 51
Item 16: Use regular expression memory. ..... 55
Item 17: Avoid greed when parsimony is best. ..... 64
Item 18: Remember that whitespace is not a word boundary. ..... 68
Item 19: Use split for clarity, unpack for efficiency. ..... 71
Item 20: Avoid using regular expressions for simple string operations. ..... 74
Item 21: Make regular expressions readable. ..... 77
Item 22: Make regular expressions efficient. ..... 80
Subroutines ..... 87
Item 23: Understand the difference between my and local. ..... 87
Item 24: Avoid using @_ directly--unless you have to. ..... 95
Item 25: Use wantarray to write subroutines returning lists. ..... 97
Item 26: Pass references instead of copies. ..... 99
Item 27: Use hashes to pass named parameters. ..... 104
Item 28: Use prototypes to get special argument parsing. ..... 108
Item 29: Use subroutines to create other subroutines. ..... 110
References ..... 117
Item 30: Understand references and reference syntax. ..... 117
Item 31: Create lists of lists with references. ..... 124
Item 32: Don't confuse anonymous arrays with list literals. ..... 126
Item 33: Build C-style structs with anonymous hashes. ..... 128
Item 34: Be careful with circular data structures. ..... 130
Item 35: Use map and grep to manipulate complex data structures. ..... 133
Debugging ..... 137
Item 36: Enable static and/or run-time checks. ..... 138
Item 37: Use debugging and profiling modules. ..... 146
Item 38: Learn to use a debugging version of Perl. ..... 151
Item 39: Test things by using the debugger as a Perl shell. ..... 155
Item 40: Don't debug too much at once. ..... 158
Using Packages and Modules ..... 163
Item 41: Don't reinvent the wheel-use Perl modules. ..... 163
Item 42: Understand packages and modules. ..... 166
Item 43: Make sure Perl can find the modules you are using. ..... 170
Item 44: Use perldoc to extract documentation for installed modules. ..... 173
Writing Packages and Modules ..... 177
Item 45: Use h2xs to generate module boilerplate. ..... 177
Item 46: Embed your documentation with POD. ..... 183
Item 47: Use XS for low-level interfaces and/or speed. ..... 187
Item 48: Submit your useful modules to the CPAN. ..... 193
Object-Oriented Programming ..... 197
Item 49: Consider using Perl's object-oriented programming features. ..... 199
Item 50: Understand method inheritance in Perl. ..... 204
Item 51: Inherit data explicitly. ..... 210
Item 52: Create invisible interfaces with tied variables. ..... 212
Miscellany ..... 219
Item 53: Use pack and unpack for data munging. ..... 219
Item 54: Know how and when to use eval, require, and do. ..... 223
Item 55: Know when, and when not, to write networking code. ..... 229
Item 56: Don't forget the file test operators. ..... 236
Item 57: Access the symbol table with typeglobs. ..... 237
Item 58: Use @{[E]} or a tied hash to evaluate expressions inside strings. ..... 239
Item 59: Initialize with BEGIN; finish with END. ..... 242
Item 60: Some interesting Perl one-liners. ..... 245
Appendix A: sprintf ..... 251
Appendix B: Perl Resources ..... 255
Index ..... 257BR>Appendix B: Perl Resources ..... 255
Index ..... 257

L'auteur - Joseph N. Hall

Joseph N. Hall

is a consultant with 5Sigma Productions and a Perl/CGI seminar trainer with Stonehenge, a leading provider of Perl and CGI classes.

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 (perl.org), the worldwide Perl grassroots advocacy organization. Since 1985, Randal has owned and operated Stonehenge Consulting Services, Inc. Randal can be reached for comment at merlyn@stonehenge.com or (503) 777-0095, and welcomes questions on Perl and other related topics.

Caractéristiques techniques

  PAPIER
Éditeur(s) Addison Wesley
Auteur(s) Joseph N. Hall, Randal L. Schwartz
Collection A-W developers press
Parution 31/01/1998
Nb. de pages 256
Format 17,8 x 23,5
EAN13 9780201419757
ISBN13 978-0-201-41975-7

Avantages Eyrolles.com

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 sav@commande.eyrolles.com
librairie française
Librairie française depuis 1925
Recevez nos newsletters
Vous serez régulièrement informé(e) de toutes nos actualités.
Inscription