From e2932906510255a7f6a6dd4c60304b396a8f4cb6 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sat, 27 Mar 2004 20:24:25 +0000 Subject: [PATCH] Integrate: [ 22584] Subject: [perl #27790] split docs: say the string is EXPR From: Dan Jacobson (via RT) Date: 20 Mar 2004 05:21:07 -0000 Message-ID: Minor documentation nit in split [ 22586] Subject: [perl #27748] 'find2perl' bug: -exec causes chdir error From: "jdhedden@1979.usna.com (via RT)" Date: 18 Mar 2004 20:25:50 -0000 Message-ID: Cwd code was planted in the output executable after the exit, so was never run. [ 22593] Subject: Re: [perl #27906] stat documentation correction From: Andy Lester Date: Wed, 24 Mar 2004 21:48:30 -0600 Message-Id: <20040325034830.GA5865@petdance.com> (Applied with a correction from Spider Boardman.) [ 22595] [perl #26839] document the return value of an empty sub [ 22597] Clarify op.h comments for which ops the OPpDEREF* private flags are actually used; update Concise.pm to match p4raw-link: @22597 on //depot/perl: 314d47789e6f2fb6e6cb6d9aa287d0766ea79b45 p4raw-link: @22595 on //depot/perl: 4c885f753522207c2fe6ec9251d8d0843e5b9f58 p4raw-link: @22593 on //depot/perl: 61967be2c930c0a1754925d7a1d1c2924a3b57ab p4raw-link: @22586 on //depot/perl: 7cc8f6889f2ec8914bba5135c912be352f638471 p4raw-link: @22584 on //depot/perl: b2e26e6edc035b06037b6eca4ef7db0cd8e603a6 p4raw-id: //depot/maint-5.8/perl@22603 p4raw-integrated: from //depot/perl@22602 'copy in' t/op/stat.t (@21344..) x2p/find2perl.PL (@21834..) 'merge in' op.h (@22509..) pod/perlsub.pod (@22557..) ext/B/B/Concise.pm (@22566..) p4raw-edited: from //depot/perl@22584 'edit in' pod/perlfunc.pod (@22488..) --- ext/B/B/Concise.pm | 2 +- op.h | 4 ++-- pod/perlfunc.pod | 25 ++++++++++++------------- pod/perlsub.pod | 3 ++- t/op/stat.t | 14 ++++++++------ x2p/find2perl.PL | 11 ++++++++--- 6 files changed, 33 insertions(+), 26 deletions(-) diff --git a/ext/B/B/Concise.pm b/ext/B/B/Concise.pm index 9a27656..961f722 100644 --- a/ext/B/B/Concise.pm +++ b/ext/B/B/Concise.pm @@ -445,7 +445,7 @@ $priv{$_}{64} = "RTIME" for ("match", "subst", "substcont"); $priv{"repeat"}{64} = "DOLIST"; $priv{"leaveloop"}{64} = "CONT"; @{$priv{$_}}{32,64,96} = ("DREFAV", "DREFHV", "DREFSV") - for ("entersub", map("rv2${_}v", "a", "s", "h", "g"), "aelem", "helem"); + for (qw(rv2gv rv2sv padsv aelem helem)); $priv{"entersub"}{16} = "DBG"; $priv{"entersub"}{32} = "TARG"; @{$priv{$_}}{4,8,128} = ("INARGS","AMPER","NO()") for ("entersub", "rv2cv"); diff --git a/op.h b/op.h index 8655ae8..e86c667 100644 --- a/op.h +++ b/op.h @@ -144,8 +144,8 @@ Deprecated. Use C instead. /* Private for OP_REPEAT */ #define OPpREPEAT_DOLIST 64 /* List replication. */ -/* Private for OP_RV2?V, OP_?ELEM */ -#define OPpDEREF (32|64) /* Want ref to something: */ +/* Private for OP_RV2GV, OP_RV2SV, OP_AELEM, OP_AHLEM, OP_PADSV */ +#define OPpDEREF (32|64) /* autovivify: Want ref to something: */ #define OPpDEREF_AV 32 /* Want ref to AV. */ #define OPpDEREF_HV 64 /* Want ref to HV. */ #define OPpDEREF_SV (32|64) /* Want ref to SV. */ diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index beb5a66..afcde4f 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4877,8 +4877,9 @@ Example, assuming array lengths are passed before arrays: =item split -Splits a string into a list of strings and returns that list. By default, -empty leading fields are preserved, and empty trailing ones are deleted. +Splits the string EXPR into a list of strings and returns that list. By +default, empty leading fields are preserved, and empty trailing ones are +deleted. In scalar context, returns the number of fields found and splits into the C<@_> array. Use of split in scalar context is deprecated, however, @@ -5338,7 +5339,7 @@ as follows: = stat($filename); Not all fields are supported on all filesystem types. Here are the -meaning of the fields: +meanings of the fields: 0 dev device number of filesystem 1 ino inode number @@ -5356,13 +5357,13 @@ meaning of the fields: (The epoch was at 00:00 January 1, 1970 GMT.) -(*) The ctime field is non-portable, in particular you cannot expect +(*) The ctime field is non-portable. In particular, you cannot expect it to be a "creation time", see L for details. -If stat is passed the special filehandle consisting of an underline, no +If C is passed the special filehandle consisting of an underline, no stat is done, but the current contents of the stat structure from the -last stat or filetest are returned. Example: +last C, C, or filetest are returned. Example: if (-x $file && (($d) = stat(_)) && $d < 0) { print "$file is executable NFS file\n"; @@ -5407,7 +5408,7 @@ You can import symbolic mode constants (C) and functions $is_setgid = S_ISDIR($mode); You could write the last two using the C<-u> and C<-d> operators. -The commonly available S_IF* constants are +The commonly available C constants are # Permissions: read, write, execute, for user, group, others. @@ -5428,7 +5429,7 @@ The commonly available S_IF* constants are S_IREAD S_IWRITE S_IEXEC -and the S_IF* functions are +and the C functions are S_IMODE($mode) the part of $mode containing the permission bits and the setuid/setgid/sticky bits @@ -5437,7 +5438,7 @@ and the S_IF* functions are which can be bit-anded with e.g. S_IFREG or with the following functions - # The operators -f, -d, -l, -b, -c, -p, and -s. + # The operators -f, -d, -l, -b, -c, -p, and -S. S_ISREG($mode) S_ISDIR($mode) S_ISLNK($mode) S_ISBLK($mode) S_ISCHR($mode) S_ISFIFO($mode) S_ISSOCK($mode) @@ -5449,10 +5450,8 @@ and the S_IF* functions are S_ISENFMT($mode) S_ISWHT($mode) See your native chmod(2) and stat(2) documentation for more details -about the S_* constants. - -To get status info for a symbolic link instead of the target file -behind the link, use the C function, see L. +about the C constants. To get status info for a symbolic link +instead of the target file behind the link, use the C function. =item study SCALAR diff --git a/pod/perlsub.pod b/pod/perlsub.pod index 49dbe7e..31e4f59 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -67,7 +67,8 @@ Assigning to the whole array C<@_> removes that aliasing, and does not update any arguments. The return value of a subroutine is the value of the last expression -evaluated. More explicitly, a C statement may be used to exit the +evaluated by that sub, or the empty list in the case of an empty sub. +More explicitly, a C statement may be used to exit the subroutine, optionally specifying the returned value, which will be evaluated in the appropriate context (list, scalar, or void) depending on the context of the subroutine call. If you specify no return value, diff --git a/t/op/stat.t b/t/op/stat.t index 3cc3f0a..23445c2 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -26,6 +26,7 @@ $Is_Solaris = $^O eq 'solaris'; $Is_VMS = $^O eq 'VMS'; $Is_DGUX = $^O eq 'dgux'; $Is_MPRAS = $^O =~ /svr4/ && -f '/etc/.relid'; +$Is_Rhapsody= $^O eq 'rhapsody'; $Is_Dosish = $Is_Dos || $Is_OS2 || $Is_MSWin32 || $Is_NetWare || $Is_Cygwin; @@ -112,10 +113,11 @@ SKIP: { !isnt($mtime, $ctime, 'hard link ctime != mtime') ) { print STDERR <