This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Refactor inccode.t to use is_miniperl() instead of $ENV{PERL_CORE_MINITEST}
[perl5.git] / lib / stat.pl
1 warn "Legacy library @{[(caller(0))[6]]} will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at @{[(caller)[1]]}, line @{[(caller)[2]]}.\n";
2
3 ;# This legacy library is deprecated and will be removed in a future
4 ;# release of perl.
5 ;#
6 ;# Usage:
7 ;#      require 'stat.pl';
8 ;#      @ary = stat(foo);
9 ;#      $st_dev = @ary[$ST_DEV];
10 ;#
11
12 $ST_DEV =       0;
13 $ST_INO =       1;
14 $ST_MODE =      2;
15 $ST_NLINK =     3;
16 $ST_UID =       4;
17 $ST_GID =       5;
18 $ST_RDEV =      6;
19 $ST_SIZE =      7;
20 $ST_ATIME =     8;
21 $ST_MTIME =     9;
22 $ST_CTIME =     10;
23 $ST_BLKSIZE =   11;
24 $ST_BLOCKS =    12;
25
26 ;# Usage:
27 ;#      require 'stat.pl';
28 ;#      do Stat('foo');         # sets st_* as a side effect
29 ;#
30 sub Stat {
31     ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size,
32         $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_));
33 }
34
35 1;