perl 5.003_01: lib/ExtUtils/MakeMaker.pm
[p5sagit/p5-mst-13.2.git] / lib / English.pm
index d40d28a..ce4520a 100644 (file)
@@ -3,6 +3,32 @@ package English;
 require Exporter;
 @ISA = (Exporter);
 
+=head1 NAME
+
+English - use nice English (or awk) names for ugly punctuation variables
+
+=head1 SYNOPSIS
+
+    use English;
+    ...
+    if ($ERRNO =~ /denied/) { ... }
+
+=head1 DESCRIPTION
+
+This module provides aliases for the built-in variables whose
+names no one seems to like to read.  Variables with side-effects
+which get triggered just by accessing them (like $0) will still 
+be affected.
+
+For those variables that have an B<awk> version, both long
+and short English alternatives are provided.  For example, 
+the C<$/> variable can be referred to either $RS or 
+$INPUT_RECORD_SEPARATOR if you are using the English module.
+
+See L<perlvar> for a complete list of these.
+
+=cut
+
 local $^W = 0;
 
 # Grandfather $NAME import
@@ -41,6 +67,7 @@ sub import {
        *CHILD_ERROR
        *OS_ERROR
        *ERRNO
+       *EXTENDED_OS_ERROR
        *EVAL_ERROR
        *PROCESS_ID
        *PID
@@ -62,6 +89,7 @@ sub import {
        *BASETIME
        *WARNING
        *EXECUTABLE_NAME
+       *OSNAME
 );
 
 # The ground of all being.
@@ -110,6 +138,7 @@ sub import {
 
        *CHILD_ERROR                            = *?    ;
        *OS_ERROR                               = *!    ;
+       *EXTENDED_OS_ERROR                      = *^E   ;
            *ERRNO                              = *!    ;
        *EVAL_ERROR                             = *@    ;
 
@@ -138,6 +167,7 @@ sub import {
        *BASETIME                               = *^T   ;
        *WARNING                                = *^W   ;
        *EXECUTABLE_NAME                        = *^X   ;
+       *OSNAME                                 = *^O   ;
 
 # Deprecated.