This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Reimplement $[ as a module
authorFather Chrysostomos <sprout@cpan.org>
Fri, 21 Oct 2011 12:58:40 +0000 (05:58 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Sat, 22 Oct 2011 05:12:59 +0000 (22:12 -0700)
commitb82b06b8ca329f89b70366e25afb8e2be30b446e
tree2048b9c510b101230175661356eae7ca5d1f4ba6
parent0be9b861b326969b378910bfcdea3f19d0d42992
Reimplement $[ as a module

This commit reimplements $[ using PL_check hooks, custom pp func-
tions and ties.

Outside of its compile-time use, $[ is now parsed as a simple varia-
ble, so function calls like foo($[) are permitted, which was not the
case with the former implementation removed by e1dccc0.  I consider
that a bug fix.

The ‘That use of $[ is unsupported’ errors are out of necessity
deferred to run-time and implemented by a tied $[.

Indices between 0 and the array base are now treated consistently, as
are indices between a negative array base and zero.  That, too, is
a bug fix.
26 files changed:
MANIFEST
Porting/Maintainers.pl
ext/arybase/Makefile.PL [new file with mode: 0644]
ext/arybase/arybase.pm [new file with mode: 0644]
ext/arybase/arybase.xs [new file with mode: 0644]
ext/arybase/ptable.h [new file with mode: 0644]
ext/arybase/t/aeach.t [new file with mode: 0644]
ext/arybase/t/aelem.t [new file with mode: 0644]
ext/arybase/t/akeys.t [new file with mode: 0644]
ext/arybase/t/arybase.t [new file with mode: 0644]
ext/arybase/t/aslice.t [new file with mode: 0644]
ext/arybase/t/av2arylen.t [new file with mode: 0644]
ext/arybase/t/index.t [new file with mode: 0644]
ext/arybase/t/lslice.t [new file with mode: 0644]
ext/arybase/t/pos.t [new file with mode: 0644]
ext/arybase/t/scope.t [new file with mode: 0644]
ext/arybase/t/scope_0.pm [new file with mode: 0644]
ext/arybase/t/splice.t [new file with mode: 0644]
ext/arybase/t/substr.t [new file with mode: 0644]
gv.c
mg.c
pod/perldiag.pod
pod/perlvar.pod
t/op/array_base.t
t/op/magic.t
t/porting/known_pod_issues.dat