@@ -221,34 +221,34 @@ File::stat - by-name interface to Perl's built-in stat() functions
221
221
222
222
=head1 SYNOPSIS
223
223
224
- use File::stat;
225
- my $st = stat($file) or die "No $file: $!";
226
- if ( ($st->mode & 0111) && ($st->nlink > 1) ) {
227
- print "$file is executable with lotsa links\n";
228
- }
229
-
230
- if ( -x $st ) {
231
- print "$file is executable\n";
232
- }
233
-
234
- use Fcntl "S_IRUSR";
235
- if ( $st->cando(S_IRUSR, 1) ) {
236
- print "My effective uid can read $file\n";
237
- }
238
-
239
- use File::stat qw(:FIELDS);
240
- stat($file) or die "No $file: $!";
241
- if ( ($st_mode & 0111) && ($st_nlink > 1) ) {
242
- print "$file is executable with lotsa links\n";
243
- }
224
+ use File::stat;
225
+ my $st = stat($file) or die "No $file: $!";
226
+ if ( ($st->mode & 0111) && ($st->nlink > 1) ) {
227
+ print "$file is executable with lotsa links\n";
228
+ }
229
+
230
+ if ( -x $st ) {
231
+ print "$file is executable\n";
232
+ }
233
+
234
+ use Fcntl "S_IRUSR";
235
+ if ( $st->cando(S_IRUSR, 1) ) {
236
+ print "My effective uid can read $file\n";
237
+ }
238
+
239
+ use File::stat qw(:FIELDS);
240
+ stat($file) or die "No $file: $!";
241
+ if ( ($st_mode & 0111) && ($st_nlink > 1) ) {
242
+ print "$file is executable with lotsa links\n";
243
+ }
244
244
245
245
=head1 DESCRIPTION
246
246
247
247
This module's default exports override the core stat()
248
248
and lstat() functions, replacing them with versions that return
249
249
"File::stat" objects. This object has methods that
250
250
return the similarly named structure field name from the
251
- stat(2) function; namely,
251
+ L< stat(2)> function; namely,
252
252
dev,
253
253
ino,
254
254
mode,
@@ -268,7 +268,7 @@ As of version 1.02 (provided with perl 5.12) the object provides C<"-X">
268
268
overloading, so you can call filetest operators (C<-f > , C<-x > , and so
269
269
on) on it. It also provides a C<< ->cando >> method, called like
270
270
271
- $st->cando( ACCESS, EFFECTIVE )
271
+ $st->cando( ACCESS, EFFECTIVE )
272
272
273
273
where I<ACCESS > is one of C<S_IRUSR > , C<S_IWUSR > or C<S_IXUSR > from the
274
274
L<Fcntl|Fcntl> module, and I<EFFECTIVE > indicates whether to use
@@ -353,7 +353,7 @@ do not, since the information required is not available.
353
353
354
354
=head1 NOTE
355
355
356
- While this class is currently implemented using the Class::Struct
356
+ While this class is currently implemented using the L< Class::Struct>
357
357
module to build a struct-like class, you shouldn't rely upon this.
358
358
359
359
=head1 AUTHOR
0 commit comments