Muutke küpsiste eelistusi

E-raamat: Mastering Perl: Creating Professional Programs with Perl

  • Formaat: 400 pages
  • Ilmumisaeg: 09-Jan-2014
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781449364960
Teised raamatud teemal:
  • Formaat - EPUB+DRM
  • Hind: 32,75 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: 400 pages
  • Ilmumisaeg: 09-Jan-2014
  • Kirjastus: O'Reilly Media
  • Keel: eng
  • ISBN-13: 9781449364960
Teised raamatud teemal:

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

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
Preface xi
1 Advanced Regular Expressions 1(30)
Readable Regexes, /x and (?#...)
1(2)
Global Matching
3(4)
Global Match Anchors
5(2)
Recursive Regular Expressions
7(11)
Repeating a Subpattern
7(11)
Lookarounds
18(7)
Lookahead Assertions, (?=PATTERN) and (?!PATTERN)
18(4)
Lookbehind Assertions, (?<!PATTERN) and (?<=PATTERN)
22(3)
Debugging Regular Expressions
25(4)
The -D Switch
25(4)
Summary
29(1)
Further Reading
29(2)
2 Secure Programming Techniques 31(30)
Bad Data Can Ruin Your Day
31(1)
Taint Checking
32(5)
Warnings Instead of Fatal Errors
34(1)
Automatic Taint Mode
35(1)
mod_perl
35(1)
Tainted Data
35(1)
Side Effects of Taint Checking
36(1)
Untainting Data
37(8)
IO::Handle::untaint
39(1)
Hash Keys
40(1)
Taint::Util
41(1)
Choosing Untainted Data with Tainted Data
41(1)
Symbolic References
42(3)
Defensive Database Programming with DBI
45(2)
List Forms of system and exec
47(3)
Three-Argument open
48(1)
sysopen
49(1)
Limit Special Privileges
49(1)
Safe Compartments
50(6)
Safe Limitations
56(1)
A Little Fun
56(1)
Summary
57(1)
Further Reading
58(3)
3 Pori Debuggers 61(14)
Before You Waste Too Much Time
61(1)
The Best Debugger in the World
62(5)
Safely Changing Modules
63(1)
Wrapping Subroutines
64(3)
The Perl Debugger
67(1)
Alternative Debuggers
68(4)
Using a Different Debugger with -d
68(1)
Devel::ptkdb
68(2)
Devel::ebug
70(1)
Devel::hdb
71(1)
IDE Debuggers
72(1)
EPIC
72(1)
Komodo
72(1)
Summary
72(1)
Further Reading
73(2)
4 Profiling Perl 75(20)
Finding the Culprit
75(4)
The General Approach
79(2)
Profiling DBI
81(8)
Other DBI::Profile Reports
85(1)
Making It Even Easier
86(1)
Switching Databases
87(2)
Devel::NYTProf
89(1)
Writing My Own Profiler
90(1)
Devel::LineCounter
90(1)
Profiling Test Suites
91(2)
Devel::Cover
91(2)
Summary
93(1)
Further Reading
93(2)
5 Benchmarking Perl 95(26)
Benchmarking Theory
95(2)
Benchmarking Time
97(3)
Comparing Code
100(3)
Don't Turn Off Your Thinking Cap
103(4)
Isolating the Environment
107(2)
Handling Outliers
109(2)
Memory Use
111(5)
The perlbench Tool
116(2)
Summary
118(1)
Further Reading
118(3)
6 Cleaning Up Perl 121(14)
Good Style
121(1)
perltidy
122(2)
Deobfuscation
124(5)
De-encoding Hidden Source
124(3)
Unparsing Code with B::Deparse
127(2)
Perl::Critic
129(4)
Creating My Own Perl::Critic Policy
132(1)
Summary
133(1)
Further Reading
134(1)
7 Symbol Tables and Typeglobs 135(16)
Package and Lexical Variables
135(4)
Getting the Package Version
137(2)
The Symbol Table
139(9)
Typeglobs
141(3)
Aliasing
144(2)
Filehandle Arguments in Older Code
146(1)
Naming Anonymous Subroutines
147(1)
The Easy Way
148(1)
Summary
149(1)
Further Reading
150(1)
8 Dynamic Subroutines 151(22)
Subroutines as Data
151(4)
Creating and Replacing Named Subroutines
155(2)
Symbolic References
157(2)
Iterating Through Subroutine Lists
159(2)
Processing Pipelines
161(1)
Self-Referencing Anonymous Subroutines
162(1)
Method Lists
162(1)
Subroutines as Arguments
163(4)
Autoloaded Methods
167(4)
Hashes as Objects
169(1)
AutoSplit
170(1)
Summary
171(1)
Further Reading
171(2)
9 Modifying and Jury-Rigging Modules 173(14)
Choosing the Right Solution
173(3)
Sending Patches to the Author
173(2)
Local Patches
175(1)
Taking Over a Module
175(1)
Forking
176(1)
Starting Over on My Own
176(1)
Replacing Module Parts
176(3)
Subclassing
179(5)
An ExtUtils::MakeMaker Example
181(3)
Other Examples
184(1)
Wrapping Subroutines
184(2)
Summary
186(1)
Further Reading
186(1)
10 Configuring Pert Programs 187(20)
Things Not to Do
187(3)
Code in a Separate File
189(1)
Better Ways
190(3)
Environment Variables
190(1)
Special Environment Variables
191(1)
Turning on Extra Output
191(2)
Command-Line Switches
193(7)
The -s Switch
194(1)
Getopt Modules
195(5)
Configuration Files
200(2)
ConfigReader::Simple
200(1)
Config::IniFiles
201(1)
Config::Scoped
201(1)
Other Configuration Formats
202(1)
Scripts with a Different Name
202(1)
Interactive and Noninteractive Programs
203(1)
perl's Config
204(2)
Different Operating Systems
205(1)
Summary
206(1)
Further Reading
206(1)
11 Detecting and Reporting Errors 207(28)
Perl Error Basics
207(6)
Operating System Errors
208(2)
Child Process Errors
210(2)
Errors Specific to the Operating System
212(1)
Reporting Module Errors
213(2)
Separation of Concerns
213(2)
Exceptions
215(10)
eval
216(1)
Multiple Levels of die
217(1)
die with a Reference
218(2)
Propagating Objects with die
220(2)
Clobbering $@
222(2)
autodie
224(1)
Reporting the Culprit
225(4)
Catching Exceptions
229(3)
Try::Tiny
229(2)
TryCatch
231(1)
Polymorphic Return Values
232(1)
Summary
233(1)
Further Reading
233(2)
12 Logging 235(14)
Recording Errors and Other Information
235(1)
Log4perl
236(11)
Subroutine Arguments
238(1)
Configuring Log4perl
239(4)
Persistent Configuration
243(1)
Logging Categories
243(2)
Other Log::Log4perl Features
245(2)
Summary
247(1)
Further Reading
247(2)
13 Data Persistence 249(30)
Perl-Specific Formats
249(9)
pack
249(2)
Fixed-Length Records
251(1)
Unpacking Binary Formats
251(1)
Data::Dumper
252(4)
Similar Modules
256(2)
Storable
258(6)
Freezing Data
259(3)
Storable's Security Problem
262(2)
Sereal
264(5)
DBM Files
269(3)
dbmopen
270(1)
DBM::Deep
270(2)
Perl-Agnostic Formats
272(5)
JSON
272(2)
YAML
274(2)
MessagePack
276(1)
Summary
277(1)
Further Reading
277(2)
14 Working with Pod 279(14)
The Pod Format
279(2)
Directives
279(2)
Encoding
281(1)
Body Elements
281(1)
Translating Pod
281(7)
Pod Translators
282(1)
Pod::Perldoc::ToToc
283(2)
Pod::Simple
285(3)
Subclassing Pod::Simple
288(1)
Pod in Your Web Server
288(1)
Testing Pod
288(4)
Checking Pod
289(1)
Pod Coverage
289(2)
Hiding and Ignoring Functions
291(1)
Summary
292(1)
Further Reading
292(1)
15 Working with Bits 293(20)
Binary Numbers
293(2)
Writing in Binary
294(1)
Bit Operators
295(7)
Unary NOT (~)
296(2)
Bitwise AND (&)
298(1)
Binary OR (I)
299(1)
Exclusive OR (A)
300(2)
Left << and Right >> Shift Operators
302(1)
Bit Vectors
302(2)
The vec Function
304(7)
Bit String Storage
306(2)
Storing DNA
308(1)
Checking Primes
309(2)
Keeping Track of Things
311(1)
Summary
312(1)
Further Reading
312(1)
16 The Magic of Tied Variables 313(24)
They Look Like Normal Variables
313(1)
At the User Level
314(1)
Behind the Curtain
315(1)
Scalars
316(5)
Tie::Cycle
316(3)
Bounded Integers
319(1)
Self-Destructing Values
320(1)
Arrays
321(9)
Reinventing Arrays
322(3)
Something a Bit More Realistic
325(5)
Hashes
330(3)
Filehandles
333(2)
Summary
335(1)
Further Reading
335(2)
17 Modules as Programs 337(18)
The main Thing
337(1)
Backing Up
338(1)
Who's Calling?
339(1)
Testing the Program
340(5)
Modules as Tests
340(5)
Creating a Program Distribution
345(7)
Adding to the Script
347(5)
Distributing the Programs
352(1)
Summary
352(1)
Further Reading
353(2)
A Further Reading 355(4)
B Brian's Guide to Solving Any Pert Problem 359(7)
Index of Perl Modules in This Book 366(3)
Index 369
brian d foy is a prolific Perl trainer and writer, and runs The Perl Review to help people use and understand Perl through educational, consulting, code review, and more. He's a frequent speaker at Perl conferences. He's the co-author of Learning Perl, Intermediate Perl, and Effective Perl Programming, and the author of Mastering Perl. He was been an instructor and author for Stonehenge Consulting Services from 1998 to 2009, a Perl user since he was a physics graduate student, and a die-hard Mac user since he first owned a computer. He founded the first Perl user group, the New York Perl Mongers, as well as the Perl advocacy nonprofit Perl Mongers, Inc., which helped form more than 200 Perl user groups across the globe. He maintains the perlfaq portions of the core Perl documentation, several modules on CPAN, and some stand-alone scripts.