Commit | Line | Data |
---|---|---|
0adf28fd S |
1 | ;# This legacy library is deprecated and will be removed in a future |
2 | ;# release of perl. | |
3 | ;# | |
378cc40b | 4 | ;# Usage: |
e929a76b | 5 | ;# require 'stat.pl'; |
378cc40b LW |
6 | ;# @ary = stat(foo); |
7 | ;# $st_dev = @ary[$ST_DEV]; | |
8 | ;# | |
0adf28fd S |
9 | |
10 | warn( "The 'stat.pl' legacy library is deprecated and will be" | |
11 | . " removed in the next major release of perl." ); | |
12 | ||
378cc40b LW |
13 | $ST_DEV = 0 + $[; |
14 | $ST_INO = 1 + $[; | |
15 | $ST_MODE = 2 + $[; | |
16 | $ST_NLINK = 3 + $[; | |
17 | $ST_UID = 4 + $[; | |
18 | $ST_GID = 5 + $[; | |
19 | $ST_RDEV = 6 + $[; | |
20 | $ST_SIZE = 7 + $[; | |
21 | $ST_ATIME = 8 + $[; | |
22 | $ST_MTIME = 9 + $[; | |
23 | $ST_CTIME = 10 + $[; | |
24 | $ST_BLKSIZE = 11 + $[; | |
25 | $ST_BLOCKS = 12 + $[; | |
26 | ||
27 | ;# Usage: | |
e929a76b | 28 | ;# require 'stat.pl'; |
378cc40b LW |
29 | ;# do Stat('foo'); # sets st_* as a side effect |
30 | ;# | |
31 | sub Stat { | |
32 | ($st_dev,$st_ino,$st_mode,$st_nlink,$st_uid,$st_gid,$st_rdev,$st_size, | |
33 | $st_atime,$st_mtime,$st_ctime,$st_blksize,$st_blocks) = stat(shift(@_)); | |
34 | } | |
a687059c LW |
35 | |
36 | 1; |