E-Book, Englisch, 284 Seiten, eBook
Rothwell Advanced Perl Programming
1. Auflage 2020
ISBN: 978-1-4842-5863-7
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark
From Advanced to Expert
E-Book, Englisch, 284 Seiten, eBook
ISBN: 978-1-4842-5863-7
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark
Additionally, you'll see advanced subroutine handling, then packages and namespaces. Furthermore, you'll build advanced modules and install CPAN modules. Unlike Java and C++, modules have been around in Perl for a long time now. Along the way, you'll learn and use POD mark up language for Perl documentation.
Moreover, you'll get a survey of the many advanced features and data structures of the current Perl programming language. You'll also get a survey of the new features of the latest Perl 5.x release. After reading and using this book, you'll have the tools, techniques, and source code to be an expert Perl programmer.
What You Will Learn
- Carry out command-line parsing and extract scripts
- Create references; return values from a reference; work with the ref Function and strict refs
- Work with advanced Perl data types using arrays, hashes, and hash of hashes
- Use Typeglobs for symbol table entries
- Build modules and install CPAN modules
- Write documentation for Perl using POD
- Work with the newest features in Perl, including the smartmatch operator, yada yada, automated regex modifiers, the CORE namespace and more
Those with experience with Perl or who have read Rothwell's prior books, Beginning Perl Programming and Pro Perl Programming.
Zielgruppe
Professional/practitioner
Autoren/Hrsg.
Weitere Infos & Material
Chapter One Command Line Options 1.1 Introducing Command Line Options1.2 Changing Input Record Separator1.3 Create a Loop Around Your Script1.4 Editing in Place1.5 Syntax Checking 1.6 Pre-appending to @INC1.7 Including Modules1.8 Command Line Parsing1.9 Displaying Configuration Information1.10 Extracting Scripts from Messages1.11 Additional Resources1.12 Lab Exercises
Chapter Two References 2.1 What are References?2.2 Creating References 2.3 Returning the Value from a Reference2.4 The ref Function2.5 Making Anonymous References2.6 References to Functions2.7 use strict ‘refs’2.8 Additional Resources2.9 Lab Exercises
Chapter Three Advanced Data Types: Arrays 3.1 Review: What You Should Already Know About Arrays3.2 What You Might Know About Arrays3.3 Arrays of Arrays3.4 Creating Arrays of Arrays3.5 Accessing Values in an Array of Arrays3.6 Adding a Sub Array (Row)3.7 Adding a column3.8 Printing an Array of Arrays3.9 Additional Resources3.10 Lab Exercises
Chapter Four Advanced Data Types: Hashes 4.1 Review: What You Should Already Know About Hashes4.2 What You Might Know About Hashes 4.3 Hashes of Hashes4.4 Creating Hashes of Hashes4.5 Accessing Values in a Hash of Hashes4.6 Other Data Structures4.7 Additional Resources4.8 Lab Exercises
Chapter Five Typeglobs 5.1 Symbolic Tables5.2 Typeglobs5.3 Using typeglobs5.4 References vs. Typeglobs5.5 Avoiding Aliases to Entire Identifier5.6 Making constants5.7 Passing Filehandles into Functions5.8 Redefining a Function5.9 Temporarily Redefining a Function5.10 Additional Resources5.11 Lab Exercises
Chapter Six Advanced Subroutine Handling 6.1 Review: What You Should Already Know About Functions6.2 What You Might Know About Functions6.3 Making Persistent Function Variables6.4 Using the caller Function6.5 Passing Arguments by Reference6.6 Determining Functions Return Data6.7 Returning Multiple Values6.8 Exception Handling6.9 Constant Functions6.10 Prototypes6.11 Additional Resources6.12 Lab Exercises
Chapter Seven Packages and Namespaces7.1 Scope7.2 Creating Namespaces with the package Command7.3 Fully Qualified Package Names7.4 Nested Packages7.5 use strict 'vars'7.6 Identifiers Not Affected by Packages7.7 Determine the Current Package7.8 Packages vs. my Variables7.9 Additional Resources7.10 Lab Exercises Chapter Eight Building Modules 8.1 Introduction to Perl Modules8.2 Creating a Module8.3 BEGIN and END Blocks8.4 Symbol Tables in Modules8.5 Exporting Identifiers from Modules8.6 Private Identifiers8.7 Oking Symbols to Export from Modules8.8 Module Version Numbers8.9 use vs. require8.10 A Note About Library Files8.11 Additional Resources8.12 Lab Exercises
Chapter Nine Installing CPAN Modules9.1 What is CPAN?9.2 Accessing CPAN9.3 CPAN Organization9.4 Installing a CPAN Module Manually9.5 Installing CPAN Modules Using the CPAN Module9.6 Using the Perl Package Manager to Install CPAN Modules9.7 Listing What Modules are Currently Installed9.8 Additional Resources9.9 Lab Exercises
Chapter Ten POD10.1 Overview of POD10.2 POD Commands10.3 POD Text10.4 POD Verbatim10.5 POD Examples10.6 Common POD Problems10.7 POD Utilities10.8 Additional Resources10.9 Lab Exercises
Chapter Eleven Advanced Features11.1 Perl development environments11.2 The power of the do statement11.3 autodie11.4 String variables as files11.5 File::Spec11.6 Proper use of soft references11.7 Install modules from CPAN without admin privileges 11.8 Basic testing 11.9 Advanced testing 11.10 Using prove 11.11 Benchmarking
Chapter Twelve Advanced Data Structures
12.1 Introduction to Benchmarking12.2 Use the Readonly module to create constants12.3 Make large numbers more readable12.4 Make use of Scalar::Util12.5 Make use of List::Util12.6 Make use of List::MoreUtils12.7 List formatting12.8 Understand slices12.9 Make use of Hash::Util12.10 Make use of Hash::MoreUtils12.11 Smart use of subscripts12.12 Understand the advantages and disadvantages of for, foreach, grep and map12.13 Know different sort techniques12.14 Avoid using memory to store large data
Chapter Thirteen New Features12.1 Perl versions 12.2 The latest/greatest? 12.3 Changes by version12.4 The feature pragma 12.5 Make use of the Smartmatch Operator 12.6 The // operator 12.7 The UNITCHECK block 12.8 Yada yada 12.9 The autodie pragma 12.10 Using each, keys, values with arrays 12.11 New Regular Expression modifiers 12.12 Non-destructive substation 12.13 Automating Regular Expression modifiers 12.14 New feature for given 12.15 Change in use feature 12.16 The CORE namespace 12.17 Overriding Perl keywords




