Change 20656 by [EMAIL PROTECTED] on 2003/08/12 13:27:44
Integrate:
[ 20650]
Subject: [PATCH 5.8.1 @20218] xsubpp: wrong code
From: Ilya Zakharevich <[EMAIL PROTECTED]>
Date: Sun, 3 Aug 2003 06:19:02 -0700
Message-ID: <[EMAIL PROTECTED]>
[ 20651]
Microperl expects C89 (like the rest of Perl).
[ 20652]
Subject: perlcheat
From: Juerd <[EMAIL PROTECTED]>
Date: Mon, 11 Aug 2003 20:24:34 +0200
Message-Id: <[EMAIL PROTECTED]>
[ 20653]
Retract #20644 and #20643; on non-microperl non-fcntl
systems Wrong Thing would be done. (And as Sarathy
points out, closing both ends of a pipe is rather
identical to never opening it...)
[ 20654]
Add perlcheat to the toc and perl.pod; regen toc.
[ 20655]
Advertise perlcheat.
Affected files ...
... //depot/maint-5.8/perl/MANIFEST#94 integrate
... //depot/maint-5.8/perl/README.micro#3 integrate
... //depot/maint-5.8/perl/pod/buildtoc.PL#6 integrate
... //depot/maint-5.8/perl/pod/perl.pod#6 integrate
... //depot/maint-5.8/perl/pod/perlcheat.pod#1 branch
... //depot/maint-5.8/perl/pod/perltoc.pod#11 integrate
... //depot/maint-5.8/perl/pp_sys.c#29 integrate
... //depot/maint-5.8/perl/util.c#31 integrate
Differences ...
==== //depot/maint-5.8/perl/MANIFEST#94 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#93~20642~ Tue Aug 12 03:04:55 2003
+++ perl/MANIFEST Tue Aug 12 06:27:44 2003
@@ -2298,6 +2298,7 @@
pod/perlboot.pod Beginner's Object-oriented Tutorial
pod/perlbot.pod Object-oriented Bag o' Tricks
pod/perlcall.pod Callback info
+pod/perlcheat.pod Perl cheat sheet
pod/perlclib.pod Internal replacements for standard C library functions
pod/perlcompile.pod Info on using the Compiler suite
pod/perldata.pod Data structure info
==== //depot/maint-5.8/perl/README.micro#3 (text) ====
Index: perl/README.micro
--- perl/README.micro#2~20649~ Tue Aug 12 05:14:31 2003
+++ perl/README.micro Tue Aug 12 06:27:44 2003
@@ -6,7 +6,7 @@
All this is experimental. If you don't know what to do with microperl
you probably shouldn't. Do not report bugs in microperl; fix the bugs.
-We assume ANSI C plus the following:
+We assume ANSI C89 plus the following:
- <stdlib.h>
- rename()
- opendir(), readdir(), closedir() (via dirent.h)
==== //depot/maint-5.8/perl/pod/buildtoc.PL#6 (text) ====
Index: perl/pod/buildtoc.PL
--- perl/pod/buildtoc.PL#5~20598~ Sun Aug 10 11:29:12 2003
+++ perl/pod/buildtoc.PL Tue Aug 12 06:27:44 2003
@@ -123,6 +123,7 @@
perlpodspec
perlstyle
perltrap
+ perlcheat
perlrun
perldiag
==== //depot/maint-5.8/perl/pod/perl.pod#6 (text) ====
Index: perl/pod/perl.pod
--- perl/pod/perl.pod#5~20598~ Sun Aug 10 11:29:12 2003
+++ perl/pod/perl.pod Tue Aug 12 06:27:44 2003
@@ -40,6 +40,7 @@
perlstyle Perl style guide
+ perlcheat Perl cheat sheet
perltrap Perl traps for the unwary
perldebtut Perl debugging tutorial
==== //depot/maint-5.8/perl/pod/perlcheat.pod#1 (text) ====
Index: perl/pod/perlcheat.pod
--- /dev/null Tue May 5 13:32:27 1998
+++ perl/pod/perlcheat.pod Tue Aug 12 06:27:44 2003
@@ -0,0 +1,93 @@
+=head1 NAME
+
+perlcheat - Perl 5 Cheat Sheet
+
+=head1 DESCRIPTION
+
+This 'cheat sheet' is a handy reference, meant for beginning Perl
+programmers. Not everything is mentioned, but 194 features may
+already be overwhelming.
+
+=head2 The sheet
+
+ CONTEXTS SIGILS ARRAYS HASHES
+ void $scalar whole: @array %hash
+ scalar @array slice: @array[0, 2] @hash{'a', 'b'}
+ list %hash element: $array[0] $hash{'a'}
+ &sub
+ *glob SCALAR VALUES
+ number, string, reference, glob, undef
+ REFERENCES
+ \ references $$foo[1] aka $foo->[1]
+ [EMAIL PROTECTED]&* dereference $$foo{bar} aka $foo->{bar}
+ [] anon. arrayref ${$$foo[1]}[2] aka $foo->[1]->[2]
+ {} anon. hashref ${$$foo[1]}[2] aka $foo->[1][2]
+ \() list of refs
+ NUMBERS vs STRINGS LINKS
+ OPERATOR PRECEDENCE = = perl.plover.com
+ -> + . search.cpan.org
+ ++ -- == != eq ne cpan.org
+ ** < > <= >= lt gt le ge pm.org
+ ! ~ \ u+ u- <=> cmp tpj.com
+ =~ !~ perldoc.com
+ * / % x SYNTAX
+ + - . for (LIST) { }, for (a;b;c) { }
+ << >> while ( ) { }, until ( ) { }
+ named uops if ( ) { } elsif ( ) { } else { }
+ < > <= >= lt gt le ge unless ( ) { } elsif ( ) { } else { }
+ == != <=> eq ne cmp for equals foreach (ALWAYS)
+ &
+ | ^ REGEX METACHARS REGEX MODIFIERS
+ && ^ string begin /i case insens.
+ || $ str. end (before \n) /m line based ^$
+ .. ... + one or more /s . includes \n
+ ?: * zero or more /x ign. wh.space
+ = += -= *= etc. ? zero or one /g global
+ , => {3,7} repeat in range
+ list ops () capture REGEX CHARCLASSES
+ not (?:) no capture . == [^\n]
+ and [] character class \s == [\x20\f\t\r\n]
+ or xor | alternation \w == [A-Za-z0-9_]
+ \b word boundary \d == [0-9]
+ \z string end \S, \W and \D negate
+ DO
+ use strict; DON'T LINKS
+ use warnings; "$foo" perl.com
+ my $var; $$variable_name perlmonks.org
+ open() or die $!; `$userinput` use.perl.org
+ use Modules; /$userinput/ perl.apache.org
+ parrotcode.org
+ FUNCTION RETURN LISTS
+ stat localtime caller SPECIAL VARIABLES
+ 0 dev 0 second 0 package $_ default variable
+ 1 ino 1 minute 1 filename $0 program name
+ 2 mode 2 hour 2 line $/ input separator
+ 3 nlink 3 day 3 subroutine $\ output separator
+ 4 uid 4 month-1 4 hasargs $| autoflush
+ 5 gid 5 year-1900 5 wantarray $! sys/libcall error
+ 6 rdev 6 weekday 6 evaltext $@ eval error
+ 7 size 7 yearday 7 is_require $$ process ID
+ 8 atime 8 is_dst 8 hints $. line number
+ 9 mtime 9 bitmask @ARGV command line args
+ 10 ctime just use @INC include paths
+ 11 blksz POSIX:: 3..9 only @_ subroutine args
+ 12 blcks strftime! with EXPR %ENV environment
+
+=head1 ACKNOWLEDGEMENTS
+
+The first version of this document appeared on Perl Monks, where several
+people had useful suggestions. Thank you, Perl Monks.
+
+A special thanks to Damian Conway, who didn't only suggest important changes,
+but also took the time to count the number of listed features and make a
+Perl 6 version to show that Perl will stay Perl.
+
+=head1 AUTHOR
+
+Juerd Waalboer <[EMAIL PROTECTED]>, with the help of many Perl Monks.
+
+=head1 SEE ALSO
+
+ http://perlmonks.org/?node_id=216602 the original PM post
+ http://perlmonks.org/?node_id=238031 Damian Conway's Perl 6 version
+ http://juerd.nl/site.plp/perlcheat home of the Perl Cheat Sheet
==== //depot/maint-5.8/perl/pod/perltoc.pod#11 (text+w) ====
Index: perl/pod/perltoc.pod
--- perl/pod/perltoc.pod#10~20600~ Sun Aug 10 11:32:49 2003
+++ perl/pod/perltoc.pod Tue Aug 12 06:27:44 2003
@@ -830,6 +830,26 @@
=back
+=head2 perlcheat - Perl 5 Cheat Sheet
+
+=over 4
+
+=item DESCRIPTION
+
+=over 4
+
+=item The sheet
+
+=back
+
+=item ACKNOWLEDGEMENTS
+
+=item AUTHOR
+
+=item SEE ALSO
+
+=back
+
=head2 perlrun - how to execute the Perl interpreter
=over 4
@@ -1351,12 +1371,12 @@
=item DESCRIPTION
+=over 4
+
=item OPERATORS
=item SYNTAX
-=over 4
-
=item ESCAPE SEQUENCES
=item CHARACTER CLASSES
@@ -1367,12 +1387,14 @@
=item EXTENDED CONSTRUCTS
-=back
-
=item VARIABLES
=item FUNCTIONS
+=item TERMINOLOGY
+
+=back
+
=item AUTHOR
=item SEE ALSO
@@ -11839,6 +11861,24 @@
=item DESCRIPTION
+=over 4
+
+=item Migration from C<DynaLoader>
+
+=item Backward compatible boilerplate
+
+=back
+
+=item Order of initialization: early load()
+
+=over 4
+
+=item The most hairy case
+
+=back
+
+=item LIMITATIONS
+
=item AUTHOR
=back
@@ -13918,18 +13958,6 @@
=back
-=head2 ExtUtils::Miniperl, writemain - write the C code for perlmain.c
-
-=over 4
-
-=item SYNOPSIS
-
-=item DESCRIPTION
-
-=item SEE ALSO
-
-=back
-
=head2 ExtUtils::Mkbootstrap - make a bootstrap file for use by DynaLoader
=over 4
@@ -17558,13 +17586,13 @@
=item EXPECTED METHODS
$class->PUSHED([$mode[,$fh]]), $obj->POPPED([$fh]),
-$obj->OPEN($path,$mode[,$fh]), $obj->BINMODE([,$fh]),
-$obj->FDOPEN($fd[,$fh]), $obj->SYSOPEN($path,$imode,$perm,[,$fh]),
-$obj->FILENO($fh), $obj->READ($buffer,$len,$fh), $obj->WRITE($buffer,$fh),
-$obj->FILL($fh), $obj->CLOSE($fh), $obj->SEEK($posn,$whence,$fh),
-$obj->TELL($fh), $obj->UNREAD($buffer,$fh), $obj->FLUSH($fh),
-$obj->SETLINEBUF($fh), $obj->CLEARERR($fh), $obj->ERROR($fh),
-$obj->EOF($fh)
+$obj->UTF8($bellowFlag,[$fh]), $obj->OPEN($path,$mode[,$fh]),
+$obj->BINMODE([,$fh]), $obj->FDOPEN($fd[,$fh]),
+$obj->SYSOPEN($path,$imode,$perm,[,$fh]), $obj->FILENO($fh),
+$obj->READ($buffer,$len,$fh), $obj->WRITE($buffer,$fh), $obj->FILL($fh),
+$obj->CLOSE($fh), $obj->SEEK($posn,$whence,$fh), $obj->TELL($fh),
+$obj->UNREAD($buffer,$fh), $obj->FLUSH($fh), $obj->SETLINEBUF($fh),
+$obj->CLEARERR($fh), $obj->ERROR($fh), $obj->EOF($fh)
=item EXAMPLES
@@ -20673,6 +20701,24 @@
=item SYNOPSIS
=item DESCRIPTION
+
+=over 4
+
+=item Migration from C<DynaLoader>
+
+=item Backward compatible boilerplate
+
+=back
+
+=item Order of initialization: early load()
+
+=over 4
+
+=item The most hairy case
+
+=back
+
+=item LIMITATIONS
=item AUTHOR
==== //depot/maint-5.8/perl/pp_sys.c#29 (text) ====
Index: perl/pp_sys.c
--- perl/pp_sys.c#28~20649~ Tue Aug 12 05:14:31 2003
+++ perl/pp_sys.c Tue Aug 12 06:27:44 2003
@@ -4138,8 +4138,6 @@
PerlLIO_close(pp[0]);
#if defined(HAS_FCNTL) && defined(F_SETFD)
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
-#else
- PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
if (PL_op->op_flags & OPf_STACKED) {
==== //depot/maint-5.8/perl/util.c#31 (text) ====
Index: perl/util.c
--- perl/util.c#30~20649~ Tue Aug 12 05:14:31 2003
+++ perl/util.c Tue Aug 12 06:27:44 2003
@@ -1828,8 +1828,6 @@
#if defined(HAS_FCNTL) && defined(F_SETFD)
/* Close error pipe automatically if exec works */
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
-#else
- PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
/* Now dup our end of _the_ pipe to right position */
@@ -1969,8 +1967,6 @@
PerlLIO_close(pp[0]);
#if defined(HAS_FCNTL) && defined(F_SETFD)
fcntl(pp[1], F_SETFD, FD_CLOEXEC);
-#else
- PerlLIO_close(pp[1]); /* Do as best as we can: pretend success. */
#endif
}
if (p[THIS] != (*mode == 'r')) {
End of Patch.