This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make pp_reverse fetch the lexical $_ from the correct pad
[perl5.git] / lib / stat.pl
1 ;# This legacy library is deprecated and will be removed in a future
2 ;# release of perl.
3 ;#
4 ;# Usage:
5 ;#      require 'stat.pl';
6 ;#      @ary = stat(foo);
7 ;#      $st_dev = @ary[$ST_DEV];
8 ;#
9
10 $ST_DEV =       0;
11 $ST_INO =       1;
12 $ST_MODE =      2;
13 $ST_NLINK =     3;
14 $ST_UID =       4;
15 $ST_GID =       5;
16 $ST_RDEV =      6;
17 $ST_SIZE =      7;
18 $ST_ATIME =     8;
19 $ST_MTIME =     9;
20 $ST_CTIME =     10;
21 $ST_BLKSIZE =   11;
22 $ST_BLOCKS =    12;
23
24 ;# Usage:
25 ;#      require 'stat.pl';
26 ;#      do Stat('foo');         # sets st_* as a side effect
27 ;#
28 sub Stat {
29     ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
30         $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_));
31 }
32
33 1;