Mastering Perl. 2nd Edition - Helion
ISBN: 978-14-493-6496-0
stron: 400, Format: ebook
Data wydania: 2014-01-09
Księgarnia: Helion
Cena książki: 143,65 zł (poprzednio: 167,03 zł)
Oszczędzasz: 14% (-23,38 zł)
Take the next step toward Perl mastery with advanced concepts that make coding easier, maintenance simpler, and execution faster. Mastering Perl isn't a collection of clever tricks, but a way of thinking about Perl programming for solving debugging, configuration, and many other real-world problems you’ll encounter as a working programmer.
The third in O’Reilly’s series of landmark Perl tutorials (after Learning Perl and Intermediate Perl), this fully upated edition pulls everything together and helps you bend Perl to your will.
- Explore advanced regular expressions features
- Avoid common problems when writing secure programs
- Profile and benchmark Perl programs to see where they need work
- Wrangle Perl code to make it more presentable and readable
- Understand how Perl keeps track of package variables
- Define subroutines on the fly
- Jury-rig modules to fix code without editing the original source
- Use bit operations and bit vectors to store large data efficiently
- Learn how to detect errors that Perl doesn’t report
- Dive into logging, data persistence, and the magic of tied variables
Osoby które kupowały "Mastering Perl. 2nd Edition", wybierały także:
- Hands-On Gradient Boosting with XGBoost and scikit-learn 142,38 zł, (29,90 zł -79%)
- Perl. Mistrzostwo w programowaniu 44,00 zł, (24,20 zł -45%)
- Wielkie umysły programowania. Jak myślą i pracują twórcy najważniejszych języków 79,00 zł, (47,40 zł -40%)
- Learning Perl. Making Easy Things Easy and Hard Things Possible. 7th Edition 169,00 zł, (118,30 zł -30%)
- 100 sposobów na Perl 39,00 zł, (29,25 zł -25%)
Spis treści
Mastering Perl. 2nd Edition eBook -- spis treści
- Mastering Perl
- Preface
- Becoming a Master
- What It Means to Be a Master
- Who Should Read This Book
- How to Read This Book
- What Should You Know Already?
- What I Cover
- What I Dont Cover
- Structure of This Book
- Conventions Used in This Book
- Using Code Examples
- Safari Books Online
- How to Contact Us
- Acknowledgments
- 1. Advanced Regular Expressions
- Readable Regexes, /x and (?#)
- Global Matching
- Global Match Anchors
- Recursive Regular Expressions
- Repeating a Subpattern
- Lookarounds
- Lookahead Assertions, (?=PATTERN) and (?!PATTERN)
- Positive lookahead assertions
- Negative lookahead assertions
- Lookbehind Assertions, (?<!PATTERN) and (?<=PATTERN)
- Lookahead Assertions, (?=PATTERN) and (?!PATTERN)
- Debugging Regular Expressions
- The -D Switch
- Summary
- Further Reading
- 2. Secure Programming Techniques
- Bad Data Can Ruin Your Day
- Taint Checking
- Warnings Instead of Fatal Errors
- Automatic Taint Mode
- mod_perl
- Tainted Data
- Side Effects of Taint Checking
- Untainting Data
- IO::Handle::untaint
- Hash Keys
- Taint::Util
- Choosing Untainted Data with Tainted Data
- Symbolic References
- Defensive Database Programming with DBI
- List Forms of system and exec
- Three-Argument open
- sysopen
- Limit Special Privileges
- Safe Compartments
- Safe Limitations
- A Little Fun
- Summary
- Further Reading
- 3. Perl Debuggers
- Before You Waste Too Much Time
- The Best Debugger in the World
- Safely Changing Modules
- Wrapping Subroutines
- The Perl Debugger
- Alternative Debuggers
- Using a Different Debugger with -d
- Devel::ptkdb
- Devel::ebug
- Devel::hdb
- IDE Debuggers
- EPIC
- Komodo
- Summary
- Further Reading
- 4. Profiling Perl
- Finding the Culprit
- The General Approach
- Profiling DBI
- Other DBI::Profile Reports
- Making It Even Easier
- Switching Databases
- Devel::NYTProf
- Writing My Own Profiler
- Devel::LineCounter
- Profiling Test Suites
- Devel::Cover
- Summary
- Further Reading
- 5. Benchmarking Perl
- Benchmarking Theory
- Benchmarking Time
- Comparing Code
- Dont Turn Off Your Thinking Cap
- Isolating the Environment
- Handling Outliers
- Memory Use
- The perlbench Tool
- Summary
- Further Reading
- 6. Cleaning Up Perl
- Good Style
- perltidy
- Deobfuscation
- De-encoding Hidden Source
- Unparsing Code with B::Deparse
- Perl::Critic
- Creating My Own Perl::Critic Policy
- Summary
- Further Reading
- 7. Symbol Tables and Typeglobs
- Package and Lexical Variables
- Getting the Package Version
- The Symbol Table
- Typeglobs
- Aliasing
- Filehandle Arguments in Older Code
- Naming Anonymous Subroutines
- The Easy Way
- Summary
- Further Reading
- Package and Lexical Variables
- 8. Dynamic Subroutines
- Subroutines as Data
- Creating and Replacing Named Subroutines
- Symbolic References
- Iterating Through Subroutine Lists
- Processing Pipelines
- Self-Referencing Anonymous Subroutines
- Method Lists
- Subroutines as Arguments
- Autoloaded Methods
- Hashes as Objects
- AutoSplit
- Summary
- Further Reading
- 9. Modifying and Jury-Rigging Modules
- Choosing the Right Solution
- Sending Patches to the Author
- Local Patches
- Taking Over a Module
- Forking
- Starting Over on My Own
- Replacing Module Parts
- Subclassing
- An ExtUtils::MakeMaker Example
- Other Examples
- Wrapping Subroutines
- Summary
- Further Reading
- Choosing the Right Solution
- 10. Configuring Perl Programs
- Things Not to Do
- Code in a Separate File
- Better Ways
- Environment Variables
- Special Environment Variables
- Turning on Extra Output
- Command-Line Switches
- The -s Switch
- Getopt Modules
- Getopt::Std
- Getopt::Long
- Configuration Files
- ConfigReader::Simple
- Config::IniFiles
- Config::Scoped
- Other Configuration Formats
- Scripts with a Different Name
- Interactive and Noninteractive Programs
- perls Config
- Different Operating Systems
- Summary
- Further Reading
- Things Not to Do
- 11. Detecting and Reporting Errors
- Perl Error Basics
- Operating System Errors
- Child Process Errors
- Errors Specific to the Operating System
- Reporting Module Errors
- Separation of Concerns
- Exceptions
- eval
- Multiple Levels of die
- die with a Reference
- Propagating Objects with die
- Clobbering $@
- autodie
- Reporting the Culprit
- Catching Exceptions
- Try::Tiny
- TryCatch
- Polymorphic Return Values
- Summary
- Further Reading
- Perl Error Basics
- 12. Logging
- Recording Errors and Other Information
- Log4perl
- Subroutine Arguments
- Configuring Log4perl
- Adding my own information
- Persistent Configuration
- Logging Categories
- Categories are hierarchical
- Other Log::Log4perl Features
- Summary
- Further Reading
- 13. Data Persistence
- Perl-Specific Formats
- pack
- Fixed-Length Records
- Unpacking Binary Formats
- Data::Dumper
- Similar Modules
- Storable
- Freezing Data
- Storables Security Problem
- Sereal
- DBM Files
- dbmopen
- DBM::Deep
- Perl-Agnostic Formats
- JSON
- YAML
- YAML module variants
- MessagePack
- Summary
- Further Reading
- Perl-Specific Formats
- 14. Working with Pod
- The Pod Format
- Directives
- Encoding
- Body Elements
- Translating Pod
- Pod Translators
- Pod::Perldoc::ToToc
- Pod::Simple
- Subclassing Pod::Simple
- Pod in Your Web Server
- Testing Pod
- Checking Pod
- Pod Coverage
- Hiding and Ignoring Functions
- Summary
- Further Reading
- The Pod Format
- 15. Working with Bits
- Binary Numbers
- Writing in Binary
- Bit Operators
- Unary NOT (~)
- Bitwise AND (&)
- Binary OR (|)
- Exclusive OR (^)
- Left << and Right >> Shift Operators
- Bit Vectors
- The vec Function
- Bit String Storage
- Storing DNA
- Checking Primes
- Keeping Track of Things
- Summary
- Further Reading
- Binary Numbers
- 16. The Magic of Tied Variables
- They Look Like Normal Variables
- At the User Level
- Behind the Curtain
- Scalars
- Tie::Cycle
- Bounded Integers
- Self-Destructing Values
- Arrays
- Reinventing Arrays
- Something a Bit More Realistic
- Hashes
- Filehandles
- Summary
- Further Reading
- 17. Modules as Programs
- The main Thing
- Backing Up
- Whos Calling?
- Testing the Program
- Modules as Tests
- Creating a Program Distribution
- Adding to the Script
- Distributing the Programs
- Summary
- Further Reading
- A. Further Reading
- Perl Books
- Non-Perl Books
- B. brians Guide to Solving Any Perl Problem
- My Philosophy of Problem-Solving
- My Method
- Some Stupid Things Ive Done and Still Do
- Index of Perl Modules in This Book
- Index
- Colophon
- Copyright