Author: wayland
Date: 2009-02-25 06:31:24 +0100 (Wed, 25 Feb 2009)
New Revision: 25540
Modified:
docs/Perl6/Spec/S16-io.pod
docs/Perl6/Spec/S28-special-names.pod
Log:
S16: Added some information about signal processing.
S28: Pushed the Perl5 to Perl6 special variable translation table as far as
possible
without receiving more information (well, maybe I could fix one or two
things...)
Modified: docs/Perl6/Spec/S16-io.pod
===================================================================
--- docs/Perl6/Spec/S16-io.pod 2009-02-25 05:19:17 UTC (rev 25539)
+++ docs/Perl6/Spec/S16-io.pod 2009-02-25 05:31:24 UTC (rev 25540)
@@ -71,6 +71,24 @@
S32-setting-library/IO.pod. The main functions used are listed in S29 with
references to
S32-setting-library/IO.pod.
+=head1 POSIX Signals
+
+The standard POSIX signals simply raise control exceptions that are handled as
normal
+through the signal handler, except for the fact that some of them are
resumeable. The
+exception names are:
+
+=over
+
+=item * ControlExceptionSigHUP
+
+=item * ControlExceptionSigTERM
+
+=item * ControlExceptionSigINT
+
+=back
+
+See L<S04-control> for details on how to handle exceptions.
+
=head1 Additions
Please post errors and feedback to perl6-language. If you are making
Modified: docs/Perl6/Spec/S28-special-names.pod
===================================================================
--- docs/Perl6/Spec/S28-special-names.pod 2009-02-25 05:19:17 UTC (rev
25539)
+++ docs/Perl6/Spec/S28-special-names.pod 2009-02-25 05:31:24 UTC (rev
25540)
@@ -137,104 +137,109 @@
=back
-=head1 PERL 6 / PERL 5 COMPARISON
+=head2 Perl5 to Perl6 special variable translation
-=over 4
+If a column has a "-" in it, it means that item is unavailable in that version
of Perl.
-Because a blank entry in either column could be taken to mean either
-"not in Perl 6" or "unknown", the information as presented
-below presumes an entry in both columns for every entry.
-Options are:
-
-=over 6
-
-thing as the var in question
-
-- for "not in this Perl"
-
-? for "don't know yet"
-
-=back
-
-Other organizational
-schemes may become appropriate when the table is more complete.
-
-=back
-
Perl 5 Perl 6 Comment
----------- ----------- -----------------------
STDIN $*IN See S16; actual variable is $PROCESS::IN
STDOUT $*OUT See S16; actual variable is $PROCESS::OUT
STDERR $*ERR See S16; actual variable is $PROCESS::ERR
- $_ $_ More lexically aware
+ $_ $ARG $_ More lexically aware
$_[1],$_[2].. $^a,$^b..
$a,$b - Just params to anonymous block
- $/ Object with results of last regex match
$1,$2,$3... $1,$2,$3...
- $&, $MATCH $<>
- $`, $PREMATCH substr based on $/.from
- $', $POSTMATCH substr based on $/.to
+ $& $MATCH $<>
+ $` $PREMATCH substr based on $/.from
+ $' $POSTMATCH substr based on $/.to
$+ - But info can now be retrieved from $/
$^N $*MOST_RECENT_CAPTURED_MATCH ...or some such.
- or $/[-$n] ...or omit
+ or $/[-$n] ...or omit
@- $1.start, etc
@+ $1.end, etc.
- $* -
- $# -
- $. $*IN.input_record_number()
- $/ $*IN.input_record_separator()
+ %! -
+ $[ - This feature has been removed
+ $* - Deprecated long ago
+ $# - Deprecated long ago
+ $^H - These were only ever internal anyway
+ %^H -
+ - $! Current exception (see L<S04-control>)
+ $! $ERRNO $OS_ERROR - Can get some info from new $!
+ $? $CHILD_ERROR -
+ $@ $EVAL_ERROR - Just throws an exception now (see
L<S04-control>)
+ $^E -
+ $. $NR $*IN.input_record_number()
+ $/ $RS $*IN.input_record_separator()
$| $*OUT.autoflush()
- $, $*OUT.output_field_separator()
+ $, $OFS $*OUT.output_field_separator()
$\ $*OUT.output_record_separator()
- $$, $PID $*PID
- $<, $UID $*UID Real UID (User ID)
- $(, $GID $*GID Real GID (Group ID)
- $>, $EUID $*EUID Effective UID
- $), $EGID $*EGID Effective GID
- $0, $PROGRAM_NAME $*PROGRAM_NAME
- $^C, $COMPILING $*COMPILING
- $^D, $DEBUGGING $*DEBUGGING
- $^F, $SYS_FD_MAX $*SYS_FD_MAX ...or some such
- $^I, $INPLACE_EDIT $*INPLACE_EDIT ...or some such
+ $" $LIST_SEPARATOR -
+ $; $SUBSEP -
+ $$ $PID $*PID
+ $< $UID $*UID Real UID (User ID)
+ $( $GID $*GID Real GID (Group ID)
+ $> $EUID $*EUID Effective UID
+ $) $EGID $*EGID Effective GID
+ $0 $PROGRAM_NAME $*PROGRAM_NAME
+ $^C $COMPILING $*COMPILING
+ $^D $DEBUGGING $*DEBUGGING
+ $^F $SYS_FD_MAX $*SYS_FD_MAX ...or some such
+ $^I $INPLACE_EDIT $*INPLACE_EDIT ...or some such
$^M $*EMERGENCY_MEMORY ...or some such (or omit)
- $^O, $OSNAME $*OSNAME ...or some such
- $^P, $PERLDB $*PERLDB ...or some such
+ $^O $OSNAME $*OSNAME ...or some such
+ $^P $PERLDB $*PERLDB ...or some such
$^R $*LAST_REGEXP_CODE_RESULT ...or some such. Or omit.
- $^T, $BASETIME $*BASETIME A Temporal::Instant object
+ $^T $BASETIME $*BASETIME A Temporal::Instant object
${^WARNING_BITS} $?WARNINGS
$^X $*EXECUTABLE_NAME ...or some such
- $EXECUTABLE_NAME
+ ARGV $*ARGS Note the P6 idiom for this handle:
+ for =$*ARGS {
+ # each time through loop
+ # proc a line from files named in ARGS
+ }
+ @ARGV @*ARGS
+ ARGVOUT $*ARGVOUT Another IO object
+ @F @*INPLACE_AUTOSPLIT_FIELDS ..or some such
+ %ENV %*ENV
- ******* XXX the columns seem to have switched! *********
+=head2 Old stuff for p5/p6 comparison
- - $" $LIST_SEPARATOR
+This section will eventually die, but for now, it contains some old
information on which
+Perl5 special variables will turn into Perl6 special variables.
- - $; $SUBSEP $SUBSCRIPT_SEPARATOR
+=over 4
- ? ${^ENCODING}
+Because a blank entry in either column could be taken to mean either
+"not in Perl 6" or "unknown", the information as presented
+below presumes an entry in both columns for every entry.
+Options are:
- $! Universal error object with as much info as
- you'd like on the current exception (unthrown
- outside of CATCH, thrown inside). Unthrown
- exceptions are typically interesting values
- of undef.
- - $! $ERRNO $OS_ERROR
- - $? $CHILD_ERROR
- - $@ $EVAL_ERROR
- - $^E $EXTENDED_OS_ERROR
+=over 6
- - %!
+thing as the var in question
- - $[ Index of the first element in an array,
- and of the first character in a substring.
+- for "not in this Perl"
-
+? for "don't know yet"
+
+=back
+
+Other organizational
+schemes may become appropriate when the table is more complete.
+
+=back
+
+ ******* XXX the columns seem to have switched! *********
+
+ ? ${^ENCODING}
+
+
- $^V $PERL_VERSION
- $] version + patchlevel / 1000 of Perl interpreter
Replacement for the above two is unclear.
- - $^H
- - %^H
- ${^OPEN}
@@ -248,28 +253,12 @@
? $ARGV
- $*ARGS ARGV Note the P6 idiom:
- for =$*ARGS {
- # each time through loop
- # proc a line from files named in ARGS
- }
-
- @*ARGS @ARGV
-
- $*ARGVOUT
- ARGVOUT
-
- @*INPLACE_AUTOSPLIT_FIELDS ..or some such
- @F
-
? @INC Uncertain but we need a way to add to search path
? %INC Uncertain but we need a way to add to search path
? @_
- %*ENV %ENV Or %ENV
-
%*SIG %SIG Or possibly &*ON_SIGINT, etc. But then we'd need
to add some signal introspection in another way.
@@ -279,7 +268,8 @@
- $^S $EXCEPTIONS_BEING_CAUGHT
-XXX Everything below this line is older than everything above it. XXX
+XXX Everything below this line is older than everything above it.
+...except for the stuff at the bottom taken from S22. XXX
=head1 OUTLINE