Also sprach J Krugman:
I'm going blind reading the Perl source! It's chaos!!!
There are rumours that perl has initially really just been an
experiment to prove that a program can be written only by using the
preprocessor. It eventually failed and that's the reason why you'll
occasionally find a few lines of C code sprinkled in between the
preprocessor directives.
Where is PL_stack_base defined???
Most of that stuff is defined in intrpvar.h and thrdvar.h. These two
headers list all the fields of 'struct interpreter'. A few hundred
macros eventually transform PL_stack_base into Tstack_base which is then
inserted into 'struct interpreter' via thrdvar.h (see perl.h). The
actual definition is done with
PERLVAR(Tstack_base, SV **);
which translates into
SV ** Tstack_base;
That means that PL_stack_base is just a pointer to a pointer of scalars
which makes sense for a stack.
I know about perlguts, but it is of no help with questions like
this. Is there any other guide to the Perl source code?
Maybe
<
http://gisle.aas.no/perl/illguts/>
can help a bit.
Other than that, there is no real guide to the source that I know of.
Everyone has acquired his own set of secret source reading and
understanding skills. They are not secret by malice but because they are
hard to formalize and be put into words.
My trick is to skip those parts I don't understand and conclude that I
probably don't need to understand them. This works well 90% of the time.
To resolve the remaining 10%, a few consoles, grep and patience usually
help.
Tassilo