X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FEnglish.pm;h=ce4520a89118b1509a8ab2133c876626e79c48e0;hb=ccd13d1e2262a17c4c370c99cf06a24ebb84a875;hp=d40d28af7d008cfad3b6f1bbba2da1343c4a9a50;hpb=748a93069b3d16374a9859d1456065dd3ae11394;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/English.pm b/lib/English.pm index d40d28a..ce4520a 100644 --- a/lib/English.pm +++ b/lib/English.pm @@ -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 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 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.