This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Perl_doref(): make non-recursive
This stops the following code from SEGVing for example:
my $e = "\$r";
$e = "+do{$e}" for 1..70_000;
$e = "push \@{$e}, 1";
eval $e;
Similarly with a long
$a[0][0][0][0].....
This commit causes a slight change in behaviour, in that scalar(o)
is now only called once at the end of the top-level doref() call,
rather than at the end of processing each child. This should make no
functional difference, apart from speeding up compiling infinitesimally.