Skip to content

Commit e2ffe00

Browse files
committed
File::stat: consistently indent verbatim blocks by 4 spaces
Previously, the POD used a mix of 1-space and 4-space indents. Also, hyperlink stat(2) and Class::Struct.
1 parent 6822251 commit e2ffe00

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

lib/File/stat.pm

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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
247247
This module's default exports override the core stat()
248248
and lstat() functions, replacing them with versions that return
249249
"File::stat" objects. This object has methods that
250250
return the similarly named structure field name from the
251-
stat(2) function; namely,
251+
L<stat(2)> function; namely,
252252
dev,
253253
ino,
254254
mode,
@@ -268,7 +268,7 @@ As of version 1.02 (provided with perl 5.12) the object provides C<"-X">
268268
overloading, so you can call filetest operators (C<-f>, C<-x>, and so
269269
on) on it. It also provides a C<< ->cando >> method, called like
270270
271-
$st->cando( ACCESS, EFFECTIVE )
271+
$st->cando( ACCESS, EFFECTIVE )
272272
273273
where I<ACCESS> is one of C<S_IRUSR>, C<S_IWUSR> or C<S_IXUSR> from the
274274
L<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>
357357
module to build a struct-like class, you shouldn't rely upon this.
358358
359359
=head1 AUTHOR

0 commit comments

Comments
 (0)