@@ -194,9 +194,9 @@ sub populate {
194
194
return $stob ;
195
195
}
196
196
197
- sub lstat :prototype($ ) { populate(CORE::lstat (shift )) }
197
+ sub lstat :prototype(_ ) { populate(CORE::lstat (shift )) }
198
198
199
- sub stat :prototype($ ) {
199
+ sub stat :prototype(_ ) {
200
200
my $arg = shift ;
201
201
my $st = populate(CORE::stat $arg );
202
202
return $st if defined $st || ref $arg ;
@@ -293,17 +293,19 @@ function functions with their full qualified names.
293
293
On the other hand, the built-ins are still available
294
294
via the C<CORE:: > pseudo-package.
295
295
296
- =head1 BUGS
296
+ As of version 1.15 (provided with perl 5.44) C<stat > and C<lstat > can be
297
+ called without arguments, in which case C<$_ > is used (just like the
298
+ built-in C<stat > /C<lstat > functions):
297
299
298
- As of Perl 5.8.0 after using this module you cannot use the implicit
299
- C<$_ > or the special filehandle C<_ > with stat() or lstat(), trying
300
- to do so leads into strange errors. The workaround is for C<$_ > to
301
- be explicit
300
+ my $st_1 = stat; # stat($_)
301
+ my $st_2 = lstat; # lstat($_)
302
302
303
- my $stat_obj = stat $_;
303
+ =head1 BUGS
304
304
305
- and for C<_ > to explicitly populate the object using the unexported
306
- and undocumented populate() function with CORE::stat():
305
+ As of Perl 5.8.0 after using this module you cannot use the special
306
+ filehandle C<_ > with stat() or lstat(); trying to do so leads to strange
307
+ errors. The workaround is to explicitly populate the object using the
308
+ unexported and undocumented populate() function with CORE::stat():
307
309
308
310
my $stat_obj = File::stat::populate(CORE::stat(_));
309
311
0 commit comments