small doc update to promote '-no_match_vars' of 'use English'
authorJeffrey Friedl <jfriedl@regex.info>
Mon, 4 Mar 2002 12:14:45 +0000 (04:14 -0800)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 4 Mar 2002 22:06:22 +0000 (22:06 +0000)
Message-Id: <200203042014.g24KEjP08407@ventrue.corp.yahoo.com>

p4raw-id: //depot/perl@15021

pod/perlform.pod
pod/perlipc.pod
pod/perlsec.pod
pod/perlvar.pod

index b2c87fa..53e348f 100644 (file)
@@ -187,7 +187,7 @@ stage in the expression to single-step the debugger through):
 
 If you use the English module, you can even read the variable names:
 
-    use English;
+    use English '-no_match_vars';
     $ofh = select(OUTF);
     $FORMAT_NAME     = "My_Other_Format";
     $FORMAT_TOP_NAME = "My_Top_Format";
index e591f54..80364b9 100644 (file)
@@ -374,7 +374,7 @@ write to the filehandle you opened and your kid will find it in his
 STDIN.  If you open a pipe I<from> minus, you can read from the filehandle
 you opened whatever your kid writes to his STDOUT.
 
-    use English;
+    use English '-no_match_vars';
     my $sleep_count = 0;
 
     do {
index c86ac7c..53192cb 100644 (file)
@@ -242,7 +242,7 @@ not called with a string that the shell could expand.  This is by far the
 best way to call something that might be subjected to shell escapes: just
 never call the shell at all.  
 
-        use English;
+        use English '-no_match_vars';
         die "Can't fork: $!" unless defined($pid = open(KID, "-|"));
         if ($pid) {           # parent
             while (<KID>) {
index 4bd3cf9..ac4ebf8 100644 (file)
@@ -13,14 +13,20 @@ you need only say
 
     use English;
 
-at the top of your program.  This will alias all the short names to the
-long names in the current package.  Some even have medium names,
-generally borrowed from B<awk>.
+at the top of your program. This aliases all the short names to the long
+names in the current package. Some even have medium names, generally
+borrowed from B<awk>. In general, it's best to use the
 
-If you don't mind the performance hit, variables that depend on the
-currently selected filehandle may instead be set by calling an
-appropriate object method on the IO::Handle object.  (Summary lines
-below for this contain the word HANDLE.)  First you must say
+    use English '-no_match_vars';
+
+invocation if you don't need $PREMATCH, $MATCH, or $POSTMATCH, as it avoids
+a certain performance hit with the use of regular expressions. See
+L<English>.
+
+Variables that depend on the currently selected filehandle may be set by
+calling an appropriate object method on the IO::Handle object, although
+this is less efficient than using the regular built-in variables. (Summary
+lines below for this contain the word HANDLE.) First you must say
 
     use IO::Handle;
 
@@ -33,10 +39,11 @@ or more safely,
     HANDLE->method(EXPR)
 
 Each method returns the old value of the IO::Handle attribute.
-The methods each take an optional EXPR, which if supplied specifies the
+The methods each take an optional EXPR, which, if supplied, specifies the
 new value for the IO::Handle attribute in question.  If not supplied,
 most methods do nothing to the current value--except for
 autoflush(), which will assume a 1 for you, just to be different.
+
 Because loading in the IO::Handle class is an expensive operation, you should
 learn how to use the regular built-in variables.