Preface |
|
xi | |
1 Advanced Regular Expressions |
|
1 | (30) |
|
Readable Regexes, /x and (?#...) |
|
|
1 | (2) |
|
|
3 | (4) |
|
|
5 | (2) |
|
Recursive Regular Expressions |
|
|
7 | (11) |
|
|
7 | (11) |
|
|
18 | (7) |
|
Lookahead Assertions, (?=PATTERN) and (?!PATTERN) |
|
|
18 | (4) |
|
Lookbehind Assertions, (?<!PATTERN) and (?<=PATTERN) |
|
|
22 | (3) |
|
Debugging Regular Expressions |
|
|
25 | (4) |
|
|
25 | (4) |
|
|
29 | (1) |
|
|
29 | (2) |
2 Secure Programming Techniques |
|
31 | (30) |
|
Bad Data Can Ruin Your Day |
|
|
31 | (1) |
|
|
32 | (5) |
|
Warnings Instead of Fatal Errors |
|
|
34 | (1) |
|
|
35 | (1) |
|
|
35 | (1) |
|
|
35 | (1) |
|
Side Effects of Taint Checking |
|
|
36 | (1) |
|
|
37 | (8) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
41 | (1) |
|
Choosing Untainted Data with Tainted Data |
|
|
41 | (1) |
|
|
42 | (3) |
|
Defensive Database Programming with DBI |
|
|
45 | (2) |
|
List Forms of system and exec |
|
|
47 | (3) |
|
|
48 | (1) |
|
|
49 | (1) |
|
|
49 | (1) |
|
|
50 | (6) |
|
|
56 | (1) |
|
|
56 | (1) |
|
|
57 | (1) |
|
|
58 | (3) |
3 Pori Debuggers |
|
61 | (14) |
|
Before You Waste Too Much Time |
|
|
61 | (1) |
|
The Best Debugger in the World |
|
|
62 | (5) |
|
|
63 | (1) |
|
|
64 | (3) |
|
|
67 | (1) |
|
|
68 | (4) |
|
Using a Different Debugger with -d |
|
|
68 | (1) |
|
|
68 | (2) |
|
|
70 | (1) |
|
|
71 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
72 | (1) |
|
|
73 | (2) |
4 Profiling Perl |
|
75 | (20) |
|
|
75 | (4) |
|
|
79 | (2) |
|
|
81 | (8) |
|
Other DBI::Profile Reports |
|
|
85 | (1) |
|
|
86 | (1) |
|
|
87 | (2) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
90 | (1) |
|
|
91 | (2) |
|
|
91 | (2) |
|
|
93 | (1) |
|
|
93 | (2) |
5 Benchmarking Perl |
|
95 | (26) |
|
|
95 | (2) |
|
|
97 | (3) |
|
|
100 | (3) |
|
Don't Turn Off Your Thinking Cap |
|
|
103 | (4) |
|
Isolating the Environment |
|
|
107 | (2) |
|
|
109 | (2) |
|
|
111 | (5) |
|
|
116 | (2) |
|
|
118 | (1) |
|
|
118 | (3) |
6 Cleaning Up Perl |
|
121 | (14) |
|
|
121 | (1) |
|
|
122 | (2) |
|
|
124 | (5) |
|
De-encoding Hidden Source |
|
|
124 | (3) |
|
Unparsing Code with B::Deparse |
|
|
127 | (2) |
|
|
129 | (4) |
|
Creating My Own Perl::Critic Policy |
|
|
132 | (1) |
|
|
133 | (1) |
|
|
134 | (1) |
7 Symbol Tables and Typeglobs |
|
135 | (16) |
|
Package and Lexical Variables |
|
|
135 | (4) |
|
Getting the Package Version |
|
|
137 | (2) |
|
|
139 | (9) |
|
|
141 | (3) |
|
|
144 | (2) |
|
Filehandle Arguments in Older Code |
|
|
146 | (1) |
|
Naming Anonymous Subroutines |
|
|
147 | (1) |
|
|
148 | (1) |
|
|
149 | (1) |
|
|
150 | (1) |
8 Dynamic Subroutines |
|
151 | (22) |
|
|
151 | (4) |
|
Creating and Replacing Named Subroutines |
|
|
155 | (2) |
|
|
157 | (2) |
|
Iterating Through Subroutine Lists |
|
|
159 | (2) |
|
|
161 | (1) |
|
Self-Referencing Anonymous Subroutines |
|
|
162 | (1) |
|
|
162 | (1) |
|
|
163 | (4) |
|
|
167 | (4) |
|
|
169 | (1) |
|
|
170 | (1) |
|
|
171 | (1) |
|
|
171 | (2) |
9 Modifying and Jury-Rigging Modules |
|
173 | (14) |
|
Choosing the Right Solution |
|
|
173 | (3) |
|
Sending Patches to the Author |
|
|
173 | (2) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
176 | (1) |
|
|
176 | (3) |
|
|
179 | (5) |
|
An ExtUtils::MakeMaker Example |
|
|
181 | (3) |
|
|
184 | (1) |
|
|
184 | (2) |
|
|
186 | (1) |
|
|
186 | (1) |
10 Configuring Pert Programs |
|
187 | (20) |
|
|
187 | (3) |
|
|
189 | (1) |
|
|
190 | (3) |
|
|
190 | (1) |
|
Special Environment Variables |
|
|
191 | (1) |
|
|
191 | (2) |
|
|
193 | (7) |
|
|
194 | (1) |
|
|
195 | (5) |
|
|
200 | (2) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
201 | (1) |
|
Other Configuration Formats |
|
|
202 | (1) |
|
Scripts with a Different Name |
|
|
202 | (1) |
|
Interactive and Noninteractive Programs |
|
|
203 | (1) |
|
|
204 | (2) |
|
Different Operating Systems |
|
|
205 | (1) |
|
|
206 | (1) |
|
|
206 | (1) |
11 Detecting and Reporting Errors |
|
207 | (28) |
|
|
207 | (6) |
|
|
208 | (2) |
|
|
210 | (2) |
|
Errors Specific to the Operating System |
|
|
212 | (1) |
|
|
213 | (2) |
|
|
213 | (2) |
|
|
215 | (10) |
|
|
216 | (1) |
|
|
217 | (1) |
|
|
218 | (2) |
|
Propagating Objects with die |
|
|
220 | (2) |
|
|
222 | (2) |
|
|
224 | (1) |
|
|
225 | (4) |
|
|
229 | (3) |
|
|
229 | (2) |
|
|
231 | (1) |
|
Polymorphic Return Values |
|
|
232 | (1) |
|
|
233 | (1) |
|
|
233 | (2) |
12 Logging |
|
235 | (14) |
|
Recording Errors and Other Information |
|
|
235 | (1) |
|
|
236 | (11) |
|
|
238 | (1) |
|
|
239 | (4) |
|
|
243 | (1) |
|
|
243 | (2) |
|
Other Log::Log4perl Features |
|
|
245 | (2) |
|
|
247 | (1) |
|
|
247 | (2) |
13 Data Persistence |
|
249 | (30) |
|
|
249 | (9) |
|
|
249 | (2) |
|
|
251 | (1) |
|
|
251 | (1) |
|
|
252 | (4) |
|
|
256 | (2) |
|
|
258 | (6) |
|
|
259 | (3) |
|
Storable's Security Problem |
|
|
262 | (2) |
|
|
264 | (5) |
|
|
269 | (3) |
|
|
270 | (1) |
|
|
270 | (2) |
|
|
272 | (5) |
|
|
272 | (2) |
|
|
274 | (2) |
|
|
276 | (1) |
|
|
277 | (1) |
|
|
277 | (2) |
14 Working with Pod |
|
279 | (14) |
|
|
279 | (2) |
|
|
279 | (2) |
|
|
281 | (1) |
|
|
281 | (1) |
|
|
281 | (7) |
|
|
282 | (1) |
|
|
283 | (2) |
|
|
285 | (3) |
|
|
288 | (1) |
|
|
288 | (1) |
|
|
288 | (4) |
|
|
289 | (1) |
|
|
289 | (2) |
|
Hiding and Ignoring Functions |
|
|
291 | (1) |
|
|
292 | (1) |
|
|
292 | (1) |
15 Working with Bits |
|
293 | (20) |
|
|
293 | (2) |
|
|
294 | (1) |
|
|
295 | (7) |
|
|
296 | (2) |
|
|
298 | (1) |
|
|
299 | (1) |
|
|
300 | (2) |
|
Left << and Right >> Shift Operators |
|
|
302 | (1) |
|
|
302 | (2) |
|
|
304 | (7) |
|
|
306 | (2) |
|
|
308 | (1) |
|
|
309 | (2) |
|
|
311 | (1) |
|
|
312 | (1) |
|
|
312 | (1) |
16 The Magic of Tied Variables |
|
313 | (24) |
|
They Look Like Normal Variables |
|
|
313 | (1) |
|
|
314 | (1) |
|
|
315 | (1) |
|
|
316 | (5) |
|
|
316 | (3) |
|
|
319 | (1) |
|
|
320 | (1) |
|
|
321 | (9) |
|
|
322 | (3) |
|
Something a Bit More Realistic |
|
|
325 | (5) |
|
|
330 | (3) |
|
|
333 | (2) |
|
|
335 | (1) |
|
|
335 | (2) |
17 Modules as Programs |
|
337 | (18) |
|
|
337 | (1) |
|
|
338 | (1) |
|
|
339 | (1) |
|
|
340 | (5) |
|
|
340 | (5) |
|
Creating a Program Distribution |
|
|
345 | (7) |
|
|
347 | (5) |
|
Distributing the Programs |
|
|
352 | (1) |
|
|
352 | (1) |
|
|
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 | |