From: John Borwick Date: Wed, 1 Nov 2000 13:19:21 +0000 (-0500) Subject: Generalize the Camel wording. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b73a15ae73f7f71da9a3815a2de5baed524d5e64;p=p5sagit%2Fp5-mst-13.2.git Generalize the Camel wording. Subject: Re: perlfaq style changes Message-ID: p4raw-id: //depot/perl@7516 --- diff --git a/pod/perlfaq3.pod b/pod/perlfaq3.pod index 0400b27..1d06c2d 100644 --- a/pod/perlfaq3.pod +++ b/pod/perlfaq3.pod @@ -244,8 +244,7 @@ See the next question on ``How can I make my Perl program run faster?'' =head2 How can I make my Perl program run faster? The best way to do this is to come up with a better algorithm. This -can often make a dramatic difference. Chapter 8 in the Camel has some -efficiency tips in it you might want to look at. Jon Bentley's book +can often make a dramatic difference. Jon Bentley's book ``Programming Pearls'' (that's not a misspelling!) has some good tips on optimization, too. Advice on benchmarking boils down to: benchmark and profile to make sure you're optimizing the right part, look for diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod index 0b0d1ec..1f8a72b 100644 --- a/pod/perlfaq8.pod +++ b/pod/perlfaq8.pod @@ -217,7 +217,7 @@ FAQ for that.) There's an example of this in L). First, you put the terminal into "no echo" mode, then just read the password normally. You may do this with an old-style ioctl() function, POSIX terminal -control (see L and Chapter 7 of the Camel, 2nd ed.), or a call +control (see L or its documentation the Camel Book), or a call to the B program, with varying degrees of portability. You can also do this for most systems using the Term::ReadKey module @@ -389,7 +389,8 @@ Zombies are not an issue with C. You don't actually "trap" a control character. Instead, that character generates a signal which is sent to your terminal's currently foregrounded process group, which you then trap in your process. -Signals are documented in L and chapter 6 of the Camel. +Signals are documented in L and the +section on ``Signals'' in the Camel. Be warned that very few C libraries are re-entrant. Therefore, if you attempt to print() in a handler that got invoked during another stdio @@ -414,7 +415,8 @@ However, because syscalls restart by default, you'll find that if you're in a "slow" call, such as , read(), connect(), or wait(), that the only way to terminate them is by "longjumping" out; that is, by raising an exception. See the time-out handler for a -blocking flock() in L or chapter 6 of the Camel, 2nd ed. +blocking flock() in L or the section on ``Signals'' +in the Camel book. =head2 How do I modify the shadow password file on a Unix system? @@ -503,7 +505,8 @@ though, so if you use END blocks you should also use Perl's exception-handling mechanism is its eval() operator. You can use eval() as setjmp and die() as longjmp. For details of this, see the section on signals, especially the time-out handler for a blocking -flock() in L and chapter 6 of the Camel 2nd ed. +flock() in L or the section on ``Signals'' in +the Camel Book. If exception handling is all you're interested in, try the exceptions.pl library (part of the standard perl distribution). @@ -931,9 +934,9 @@ the current process group of your controlling terminal as follows: =head2 How do I timeout a slow event? Use the alarm() function, probably in conjunction with a signal -handler, as documented in L and chapter 6 of the -Camel. You may instead use the more flexible Sys::AlarmCall module -available from CPAN. +handler, as documented in L and the section on +``Signals'' in the Camel. You may instead use the more flexible +Sys::AlarmCall module available from CPAN. =head2 How do I set CPU limits? diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod index a977f95..ddc577b 100644 --- a/pod/perlfaq9.pod +++ b/pod/perlfaq9.pod @@ -289,7 +289,7 @@ command and arguments as a list, which prevents shell globbing. =head2 How do I parse a mail header? For a quick-and-dirty solution, try this solution derived -from page 222 of the 2nd edition of "Programming Perl": +from L: $/ = ''; $header = ;