diff options
author | Zefram <zefram@fysh.org> | 2010-04-13 22:02:58 +0100 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2010-04-27 21:33:45 +0200 |
commit | 859172fe8e35383381c4d2edab5f0525b3cb42e8 (patch) | |
tree | 4dd339e730c9f769502d339d3e0fe107814acf2f /lib/getcwd.pl | |
parent | f398020d62424dd8a766d0d9b78ced4cfea15968 (diff) | |
download | perl-859172fe8e35383381c4d2edab5f0525b3cb42e8.tar.gz |
don't use $[ in library code
Remove all uses of $[, both reads and writes, from library code.
Test code (which must test behaviour of $[) is unchanged, as is the
actual implementation of $[. Uses in CPAN libraries are also untouched:
I've opened tickets at rt.cpan.org regarding them.
Diffstat (limited to 'lib/getcwd.pl')
-rw-r--r-- | lib/getcwd.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/getcwd.pl b/lib/getcwd.pl index fcca2ced80..1c6b761f23 100644 --- a/lib/getcwd.pl +++ b/lib/getcwd.pl @@ -38,7 +38,7 @@ sub getcwd closedir(getcwd'PARENT); #'); return ''; } - if ($pst[$[] == $cst[$[] && $pst[$[ + 1] == $cst[$[ + 1]) + if ($pst[0] == $cst[0] && $pst[1] == $cst[1]) { $dir = ''; } @@ -59,8 +59,8 @@ sub getcwd # return ''; } } - while ($dir eq '.' || $dir eq '..' || $tst[$[] != $pst[$[] || - $tst[$[ + 1] != $pst[$[ + 1]); + while ($dir eq '.' || $dir eq '..' || $tst[0] != $pst[0] || + $tst[1] != $pst[1]); } $cwd = "$dir/$cwd"; closedir(getcwd'PARENT); #'); |