@@ -221,34 +221,34 @@ File::stat - by-name interface to Perl's built-in stat() functions
221221
222222=head1 SYNOPSIS
223223
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+ }
244244
245245=head1 DESCRIPTION
246246
247247This module's default exports override the core stat()
248248and lstat() functions, replacing them with versions that return
249249"File::stat" objects. This object has methods that
250250return the similarly named structure field name from the
251- stat(2) function; namely,
251+ L< stat(2)> function; namely,
252252dev,
253253ino,
254254mode,
@@ -268,7 +268,7 @@ As of version 1.02 (provided with perl 5.12) the object provides C<"-X">
268268overloading, so you can call filetest operators (C<-f > , C<-x > , and so
269269on) on it. It also provides a C<< ->cando >> method, called like
270270
271- $st->cando( ACCESS, EFFECTIVE )
271+ $st->cando( ACCESS, EFFECTIVE )
272272
273273where I<ACCESS > is one of C<S_IRUSR > , C<S_IWUSR > or C<S_IXUSR > from the
274274L<Fcntl|Fcntl> module, and I<EFFECTIVE > indicates whether to use
@@ -353,7 +353,7 @@ do not, since the information required is not available.
353353
354354=head1 NOTE
355355
356- While this class is currently implemented using the Class::Struct
356+ While this class is currently implemented using the L< Class::Struct>
357357module to build a struct-like class, you shouldn't rely upon this.
358358
359359=head1 AUTHOR
0 commit comments