Skip to content

Commit 5c3a736

Browse files
committed
File::stat: expand tabs, delete trailing spaces
Most lines in these files used spaces for indentation, but a few of them still had tabs. Keep things consistent by using spaces everywhere.
1 parent 992d8d8 commit 5c3a736

File tree

2 files changed

+36
-36
lines changed

2 files changed

+36
-36
lines changed

lib/File/stat.pm

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ our ( $st_dev, $st_ino, $st_mode,
1616

1717
use Exporter 'import';
1818
our @EXPORT = qw(stat lstat);
19-
our @fields = qw( $st_dev $st_ino $st_mode
20-
$st_nlink $st_uid $st_gid
21-
$st_rdev $st_size
22-
$st_atime $st_mtime $st_ctime
23-
$st_blksize $st_blocks
24-
);
19+
our @fields = qw( $st_dev $st_ino $st_mode
20+
$st_nlink $st_uid $st_gid
21+
$st_rdev $st_size
22+
$st_atime $st_mtime $st_ctime
23+
$st_blksize $st_blocks
24+
);
2525
our @EXPORT_OK = ( @fields, "stat_cando" );
2626
our %EXPORT_TAGS = ( FIELDS => [ @fields, @EXPORT ] );
2727

@@ -73,7 +73,7 @@ sub _ingroup {
7373
# and interpreting it later would require this module to have an XS
7474
# component (at which point we might as well just call Perl_cando and
7575
# have done with it).
76-
76+
7777
if (grep $^O eq $_, qw/os2 MSWin32/) {
7878

7979
# from doio.c
@@ -152,7 +152,7 @@ my %op = (
152152
use constant HINT_FILETEST_ACCESS => 0x00400000;
153153

154154
# we need fallback=>1 or stringifying breaks
155-
use overload
155+
use overload
156156
fallback => 1,
157157
-X => sub {
158158
my ($s, $op) = @_;
@@ -179,20 +179,20 @@ use overload
179179
use Class::Struct qw(struct);
180180
struct 'File::stat' => [
181181
map { $_ => '$' } qw{
182-
dev ino mode nlink uid gid rdev size
183-
atime mtime ctime blksize blocks
182+
dev ino mode nlink uid gid rdev size
183+
atime mtime ctime blksize blocks
184184
}
185185
];
186186

187187
sub populate {
188188
return undef unless @_;
189189
my $stob = new();
190190
@$stob = (
191-
$st_dev, $st_ino, $st_mode, $st_nlink, $st_uid, $st_gid, $st_rdev,
192-
$st_size, $st_atime, $st_mtime, $st_ctime, $st_blksize, $st_blocks )
193-
= @_;
191+
$st_dev, $st_ino, $st_mode, $st_nlink, $st_uid, $st_gid, $st_rdev,
192+
$st_size, $st_atime, $st_mtime, $st_ctime, $st_blksize, $st_blocks )
193+
= @_;
194194
return $stob;
195-
}
195+
}
196196

197197
sub lstat :prototype(_) ($arg) {
198198
populate(CORE::lstat $arg)
@@ -244,8 +244,8 @@ File::stat - by-name interface to Perl's built-in stat() functions
244244
245245
=head1 DESCRIPTION
246246
247-
This module's default exports override the core stat()
248-
and lstat() functions, replacing them with versions that return
247+
This module's default exports override the core stat()
248+
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
251251
L<stat(2)> function; namely,
@@ -262,7 +262,7 @@ mtime,
262262
ctime,
263263
blksize,
264264
and
265-
blocks.
265+
blocks.
266266
267267
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

lib/File/stat.t

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -154,28 +154,28 @@ for (split //, "tTB") {
154154
}
155155

156156
SKIP: {
157-
skip("Could not open file: $!", 2) unless $canopen;
158-
isa_ok(File::stat::stat('STAT'), 'File::stat',
159-
'... should be able to find filehandle');
160-
161-
package foo;
162-
local *STAT = *main::STAT;
163-
my $stat2 = File::stat::stat('STAT');
164-
main::isa_ok($stat2, 'File::stat',
165-
'... and filehandle in another package');
166-
close STAT;
167-
168-
# VOS open() updates atime; ignore this error (posix-975).
169-
my $stat3 = $stat2;
170-
if ($^O eq 'vos') {
171-
$$stat3[8] = $$stat[8];
172-
}
157+
skip("Could not open file: $!", 2) unless $canopen;
158+
isa_ok(File::stat::stat('STAT'), 'File::stat',
159+
'... should be able to find filehandle');
160+
161+
package foo;
162+
local *STAT = *main::STAT;
163+
my $stat2 = File::stat::stat('STAT');
164+
main::isa_ok($stat2, 'File::stat',
165+
'... and filehandle in another package');
166+
close STAT;
167+
168+
# VOS open() updates atime; ignore this error (posix-975).
169+
my $stat3 = $stat2;
170+
if ($^O eq 'vos') {
171+
$$stat3[8] = $$stat[8];
172+
}
173173

174-
main::skip("Win32: different stat-info on filehandle", 1) if $^O eq 'MSWin32';
174+
main::skip("Win32: different stat-info on filehandle", 1) if $^O eq 'MSWin32';
175175

176-
main::skip("OS/2: inode number is not constant on os/2", 1) if $^O eq 'os2';
176+
main::skip("OS/2: inode number is not constant on os/2", 1) if $^O eq 'os2';
177177

178-
main::is_deeply($stat, $stat3, '... and must match normal stat');
178+
main::is_deeply($stat, $stat3, '... and must match normal stat');
179179
}
180180

181181
SKIP:

0 commit comments

Comments
 (0)