New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stat documentation correction #7196
Comments
From limbic_region_2000@yahoo.comThis is a bug report for perl from The documentation for stat reads: # The operators -f, -d, -l, -b, -c, -p, and -s. That should be -S and not -s as -s is for size Flags: Site configuration information for perl v5.8.2: Configured by Gerrit at Fri Nov 7 12:03:56 2003. Summary of my perl5 (revision 5.0 version 8 subversion Locally applied patches: @INC for perl v5.8.2: Environment for perl v5.8.2: __________________________________ |
From @petdance
Patch attached. Fixes that, and some minor other little construction xoa Inline Patchdiff -urN -x '*~' bleadperl/pod/perlfunc.pod bleadpatch/pod/perlfunc.pod
--- bleadperl/pod/perlfunc.pod 2004-03-24 15:34:37.000000000 -0600
+++ bleadpatch/pod/perlfunc.pod 2004-03-24 21:33:54.000000000 -0600
@@ -5352,7 +5352,7 @@
= 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
@@ -5370,13 +5370,13 @@
(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<perlport/"Files and Filesystems">
for details.
-If stat is passed the special filehandle consisting of an underline, no
+If C<stat> 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<stat> or filetest are returned. Example:
if (-x $file && (($d) = stat(_)) && $d < 0) {
print "$file is executable NFS file\n";
@@ -5421,7 +5421,7 @@
$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<S_IF*> constants are
# Permissions: read, write, execute, for user, group, others.
@@ -5442,7 +5442,7 @@
S_IREAD S_IWRITE S_IEXEC
-and the S_IF* functions are
+and the C<S_IF*> functions are
S_IMODE($mode) the part of $mode containing the permission bits
and the setuid/setgid/sticky bits
@@ -5451,7 +5451,7 @@
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)
@@ -5463,7 +5463,7 @@
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
+about the C<S_*> constants. To get status info for a symbolic link
instead of the target file behind the link, use the C<lstat> function.
=item study SCALAR
diff -urN -x '*~' bleadperl/t/op/stat.t bleadpatch/t/op/stat.t
--- bleadperl/t/op/stat.t 2003-09-23 19:36:15.000000000 -0500
+++ bleadpatch/t/op/stat.t 2004-03-24 21:42:12.000000000 -0600
@@ -26,6 +26,7 @@
$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 @@
!isnt($mtime, $ctime, 'hard link ctime != mtime') ) {
print STDERR <<DIAG;
# Check if you are on a tmpfs of some sort. Building in /tmp sometimes
-# has this problem. Also building on the ClearCase VOBS filesystem may
+# has this problem. Building on the ClearCase VOBS filesystem may also
# cause this failure.
-# Darwins UFS doesn't have a ctime concept, and thus is
-# expected to fail this test.
+#
+# Darwin's UFS doesn't have a ctime concept, and thus is expected to fail
+# this test.
DIAG
}
}
@@ -176,7 +178,7 @@
ok(-w $tmpfile, ' -w');
SKIP: {
- skip "-x simply determins if a file ends in an executable suffix", 1
+ skip "-x simply determines if a file ends in an executable suffix", 1
if $Is_Dosish || $Is_MacOS;
ok(-x $tmpfile, ' -x');
@@ -212,7 +214,7 @@
if $Is_MSWin32 || $Is_NetWare || $Is_Dos;
skip "/dev isn't available to test against", 6
unless -d '/dev' && -r '/dev' && -x '/dev';
- skip "Skipping; unexpected ls output in MP-RAS", 6
+ skip "Skipping: unexpected ls output in MP-RAS", 6
if $Is_MPRAS;
my $LS = $Config{d_readlink} ? "ls -lL" : "ls -l";
@@ -307,7 +309,7 @@
SKIP: {
skip "These tests require a TTY", 4 if $ENV{PERL_SKIP_TTY_TEST};
- my $TTY = $^O eq 'rhapsody' ? "/dev/ttyp0" : "/dev/tty";
+ my $TTY = $Is_Rhapsody ? "/dev/ttyp0" : "/dev/tty";
SKIP: {
skip "Test uses unixisms", 2 if $Is_MSWin32 || $Is_NetWare;
-- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance |
The RT System itself - Status changed from 'new' to 'open' |
From spidb@cpan.orgThis change is wrong: -last stat or filetest are returned. Example: The generic notion of "stat" is what was meant, not the specific "C<stat>" -last C<stat> or filetest are returned. Example: -- |
From @petdance
I don't have patch rights, so I didn't apply anything. I just submitted -- |
From perl5-porters@perl.orgOn Thu, 25 Mar 2004 11:21:39 -0600, Andy Lester wrote (in part): [replying to me:] al> I don't have patch rights, so I didn't apply anything. I just submitted OK, I was reading too fast and only *thought* that Andy had said anything --s. -- http://www.xray.mpe.mpg.de/cgi-bin/extract-mbox/perl5-porters/2004-03?20040325034830%2EGA5865%40petdance%2Ecom |
From ams@wiw.orgAt 2004-03-24 21:48:30 -0600, andy@petdance.com wrote:
Thanks, applied with Spider's correction. (#22593) -- ams |
@iabyn - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#27906 (status was 'resolved')
Searchable as RT27906$
The text was updated successfully, but these errors were encountered: