Whether your knowledge of Perl is casual or deep, this book will make you a more accomplished programmer. It covers complex techniques for managing production-ready Perl programs and explains methods for manipulating data and objects that may have looked like magic before. Furthermore, it sets
Advanced Perl Programming
β Scribed by Sriram Srinivasan
- Publisher
- O'Reilly Media
- Year
- 1997
- Tongue
- English
- Leaves
- 548
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Whether your knowledge of Perl is casual or deep, this book will make you a more accomplished programmer. It covers complex techniques for managing production-ready Perl programs and explains methods for manipulating data and objects that may have looked like magic before. Furthermore, it sets Perl in the context of a larger environment, giving you the background you need for dealing with networks, databases, and GUIs. It also includes a discussion of internals to help you program more efficiently and embed Perl within C or C within Perl. Major topics include the practical use of packages and classes (object-oriented programming), complex data structures, persistence (e.g., using a database), networking, graphical interfaces using the Tk toolkit, interaction with C language functions, embedding and extending the Perl interpreter, and selected internals.
β¦ Table of Contents
Advanced Perl Programming......Page 0
Table of Contents......Page 1
Preface......Page 3
[Preface] Why Perl?......Page 6
[Preface] What Must I Know?......Page 8
[Preface] The Book's Approach......Page 12
[Preface] Conventions......Page 15
[Preface] Resources......Page 16
[Preface] Perl Resources......Page 17
[Preface] We'd Like to Hear from You......Page 18
[Preface] Acknowledgments......Page 19
[Chapter 1] Data References and Anonymous Storage......Page 21
[Chapter 1] 1.2 Using References......Page 29
[Chapter 1] 1.3 Nested Data Structures......Page 34
[Chapter 1] 1.4 Querying a Reference......Page 37
[Chapter 1] 1.5 Symbolic References......Page 38
[Chapter 1] 1.6 A View of the Internals......Page 40
[Chapter 1] 1.7 References in Other Languages......Page 45
[Chapter 1] 1.8 Resources......Page 47
[Chapter 2] Implementing Complex Data Structures......Page 48
[Chapter 2] 2.2 Example: Matrices......Page 51
[Chapter 2] 2.3 Professors, Students, Courses......Page 55
[Chapter 2] 2.4 Pass the Envelope......Page 59
[Chapter 2] 2.5 Pretty-Printing......Page 62
[Chapter 2] 2.6 Resources......Page 66
[Chapter 3] Typeglobs and Symbol Tables......Page 67
[Chapter 3] 3.2 Typeglobs......Page 72
[Chapter 3] 3.3 Typeglobs and References......Page 77
[Chapter 3] 3.4 Filehandles, Directory Handles, and Formats......Page 79
[Chapter 4] Subroutine References and Closures......Page 82
[Chapter 4] 4.2 Using Subroutine References......Page 85
[Chapter 4] 4.3 Closures......Page 88
[Chapter 4] 4.4 Using Closures......Page 91
[Chapter 4] 4.5 Comparisons to Other Languages......Page 97
[Chapter 4] 4.6 Resources......Page 99
[Chapter 5] Eval......Page 100
[Chapter 5] 5.2 The Block Form: Exception Handling......Page 104
[Chapter 5] 5.3 Watch Your Quotes......Page 107
[Chapter 5] 5.4 Using Eval for Expression Evaluation......Page 109
[Chapter 5] 5.5 Using Eval for Efficiency......Page 111
[Chapter 5] 5.6 Using Eval for Time-Outs......Page 117
[Chapter 5] 5.7 Eval in Other Languages......Page 119
[Chapter 5] 5.8 Resources......Page 121
[Chapter 6] Modules......Page 122
[Chapter 6] 6.2 Packages and Files......Page 126
[Chapter 6] 6.3 Package Initialization and Destruction......Page 128
[Chapter 6] 6.4 Privacy......Page 130
[Chapter 6] 6.5 Importing Symbols......Page 132
[Chapter 6] 6.6 Nesting Packages......Page 135
[Chapter 6] 6.7 Autoloading......Page 136
[Chapter 6] 6.8 Accessing the Symbol Table......Page 138
[Chapter 6] 6.9 Language Comparisons......Page 141
[Chapter 7] Object-Oriented Programming......Page 143
[Chapter 7] 7.2 Objects in Perl......Page 146
[Chapter 7] 7.3 UNIVERSAL......Page 159
[Chapter 7] 7.4 Recap of Conventions......Page 161
[Chapter 7] 7.5 Comparison with Other OO Languages......Page 165
[Chapter 7] 7.6 Resources......Page 167
[Chapter 8] Object Orientation: The Next Few Steps......Page 169
[Chapter 8] 8.2 Delegation......Page 180
[Chapter 8] 8.3 On Inheritance......Page 182
[Chapter 8] 8.4 Resources......Page 185
[Chapter 9] Tie......Page 186
[Chapter 9] 9.2 Tying Arrays......Page 191
[Chapter 9] 9.3 Tying Hashes......Page 194
[Chapter 9] 9.4 Tying Filehandles......Page 196
[Chapter 9] 9.5 Example: Monitoring Variables......Page 197
[Chapter 9] 9.6 Comparisons with Other Languages......Page 203
[Chapter 10] Persistence......Page 205
[Chapter 10] 10.2 Streamed Data......Page 209
[Chapter 10] 10.3 Record-Oriented Approach......Page 212
[Chapter 10] 10.4 Relational Databases......Page 215
[Chapter 10] 10.5 Resources......Page 221
[Chapter 11] Implementing Object Persistence......Page 222
[Chapter 11] 11.2 Design Notes......Page 227
[Chapter 11] 11.3 Implementation......Page 233
[Chapter 11] 11.4 Resources......Page 242
[Chapter 12] Networking with Sockets......Page 244
[Chapter 12] 12.2 Socket API and IO::Socket......Page 247
[Chapter 12] 12.3 Handling Multiple Clients......Page 250
[Chapter 12] 12.4 Real-World Servers......Page 256
[Chapter 12] 12.5 IO Objects and Filehandles......Page 258
[Chapter 12] 12.6 Prebuilt Client Modules......Page 260
[Chapter 12] 12.7 Resources......Page 262
[Chapter 13] Networking: Implementing RPC......Page 263
[Chapter 13] 13.2 Remote Procedure Calls (RPC)......Page 276
[Chapter 13] 13.3 Resources......Page 282
[Chapter 14] User Interfaces with Tk......Page 283
[Chapter 14] 14.2 Starting with Perl/Tk......Page 286
[Chapter 14] 14.3 Widget Tour......Page 289
[Chapter 14] 14.4 Geometry Management......Page 305
[Chapter 14] 14.5 Timers......Page 309
[Chapter 14] 14.6 Event Bindings......Page 310
[Chapter 14] 14.7 Event Loops......Page 313
[Chapter 14] 14.8 Resources......Page 315
[Chapter 15] GUI Example: Tetris......Page 316
[Chapter 15] 15.2 Design......Page 318
[Chapter 15] 15.3 Implementation......Page 320
[Chapter 16] GUI Example: Man Page Viewer......Page 327
[Chapter 16] 16.2 Implementation......Page 330
[Chapter 16] 16.3 Resources......Page 338
[Chapter 17] Template-Driven Code Generation......Page 339
[Chapter 17] 17.2 Jeeves Example......Page 343
[Chapter 17] 17.3 Jeeves Overview......Page 348
[Chapter 17] 17.4 Jeeves Implementation......Page 351
[Chapter 17] 17.5 Sample Specification Parser......Page 359
[Chapter 17] 17.6 Resources......Page 362
[Chapter 18] Extending Perl:A First Course......Page 363
[Chapter 18] 18.2 Example: Fractals with Perl......Page 368
[Chapter 18] 18.3 SWIG Features......Page 372
[Chapter 18] 18.4 XS Features......Page 375
[Chapter 18] 18.5 Degrees of Freedom......Page 379
[Chapter 18] 18.6 A Detour into Fractals......Page 380
[Chapter 18] 18.7 Resources......Page 384
[Chapter 19] Embedding Perl:The Easy Way......Page 385
[Chapter 19] 19.2 Embedding Overview......Page 388
[Chapter 19] 19.3 Examples......Page 391
[Chapter 19] 19.4 Adding Extensions......Page 395
[Chapter 19] 19.5 Resources......Page 397
[Chapter 20] Perl Internals......Page 398
[Chapter 20] 20.2 Architecture......Page 401
[Chapter 20] 20.3 Perl Value Types......Page 408
[Chapter 20] 20.4 Stacks and Messaging Protocol......Page 430
[Chapter 20] 20.5 Meaty Extensions......Page 437
[Chapter 20] 20.6 Easy Embedding API......Page 445
[Chapter 20] 20.7 A Peek into the Future......Page 448
[Chapter 20] 20.8 Resources......Page 450
[Appendix A] Tk Widget Reference......Page 452
[Appendix A] A.2 Canvas......Page 456
[Appendix A] A.3 Entry......Page 462
[Appendix A] A.4 Listbox......Page 464
[Appendix A] A.5 Menus......Page 466
[Appendix A] A.6 Scrollbars and Scrolling......Page 469
[Appendix A] A.7 Scale......Page 471
[Appendix A] A.8 HListβ¬- Hierarchical List......Page 472
[Appendix B] Syntax Summary......Page 474
[Appendix B] B.2 Nested Data Structures......Page 476
[Appendix B] B.3 Closures......Page 478
[Appendix B] B.4 Modules......Page 479
[Appendix B] B.5 Objects......Page 481
[Appendix B] B.6 Dynamic Behavior......Page 483
[Appendix B] B.7 Exception Handling......Page 484
[Appendix B] B.8 Meta-Information......Page 485
[Appendix B] B.9 Typeglobs......Page 486
[Appendix B] B.10 Filehandles, Formats......Page 487
Index: Symbols and Numbers......Page 488
Index: A......Page 489
Index: B......Page 493
Index: C......Page 495
Index: D......Page 499
Index: E......Page 502
Index: F......Page 505
Index: G......Page 507
Index: H......Page 509
Index: I......Page 511
Index: J......Page 513
Index: K......Page 514
Index: L......Page 515
Index: M......Page 517
Index: N......Page 520
Index: O......Page 522
Index: P......Page 524
Index: Q......Page 529
Index: R......Page 530
Index: S......Page 533
Index: T......Page 539
Index: U......Page 542
Index: V......Page 543
Index: W......Page 545
Index: X......Page 546
Index: Y......Page 547
Index: Z......Page 548
π SIMILAR VOLUMES
<DIV><p>With a worldwide community of users and more than a million dedicated programmers, Perl has proven to be the most effective language for the latest trends in computing and business.</p><p>Every programmer must keep up with the latest tools and techniques. This updated version of <i>Advanced
<DIV><p>With a worldwide community of users and more than a million dedicated programmers, Perl has proven to be the most effective language for the latest trends in computing and business.</p><p>Every programmer must keep up with the latest tools and techniques. This updated version of <i>Advanced
<p>O'Reilly's most high-level Perl tutorial to date, <i>Advanced Perl Programming</i>, Second Edition teaches you all the complex techniques for production-ready Perl programs. This completely updated guide clearly explains concepts such as introspection, overriding built-ins, extending Perl's objec
With a worldwide community of users and more than a million dedicated programmers, Perl has proven to be the most effective language for the latest trends in computing and business. Every programmer must keep up with the latest tools and techniques. This updated version of Advanced Perl Programming
This publication advances your Perl scripting. skills beyond the bounds of elementary script constructs, and into the realm of production-ready scripts within the context of network, database and GUI environments. Covers such advanced features as run-time evaluation, persistence, code generation, an