Hi list !
I have some legacy modules originating in the dim past of perl 5.6.x
which is to say there are likely quite a few quirks in the code.
However the stuff used to work up and including until perl 5.16.2
With 5.18.1 under certain circumstances it runs into a recursive loop
and finally stops when all memory is eaten up.
The objects are related like this:
foo
bar inherits from foo
The new() constructor of both does bless them using a stmt
ST(0) = sv_2mortal(sv_bless(newRV_noinc((SV*)hv),stash));
and stash is initialized by
if (sv_isobject(pkg))
stash = SvSTASH(SvRV(pkg));
else
stash = gv_stashsv(pkg, TRUE);
with pkg being the first parameter passed to new().
Both foo and bar also have a sub AUTOLOAD.
Inside the sub AUTOLOAD of bar there is
$self->SUPER::fum(@_)
and fum being a sub of foo.
In 5.16.2 (and all prior versions I tried over the years) this works
as expected by finally invoking foo->fum.
In 5.18.1 (by means of stepping through it in the debugger) the line
$self->SUPER::fum(@_)
inside bar->AUTOLOAD again invokes bar->AUTOLOAD where it hits once
again the line
$self->SUPER::fum(@_)
which again invokes ... and there is a recursive loop.
In both cases @ISA correctly shows foo.
I have read the perldelta.pod of 5.18.0 but nothing I've read there rang
a bell (which could easily have been due to me simply not knowing what
to look for)
Could someone pls provide a pointer where I could look further or
if this isn't the proper list give advice which is ?
Thank you for your time,
Michael
--
Michael Gerdau email:
m...@qata.de
GPG-keys available on request or at public keyserver