K
kj
I'm *astonished* anyone other than the authors can understand the
Perl source. How can *anyone* navigate this maze? It's insane.
(And how can the Perl community defend itself against the common
charge of Perl's unreadability, when all a critic needs to do is
point to the Perl source itself for an unparalleled example of
illegibility? Granted, the Perl source is not written in Perl,
but it is obviously written by people who don't give a fig about
the readability of the code. All the piousness in the umpteen Perl
style guides begins to ring hollow after one takes a look at the
Perl source.)
I've spent a couple of hours (and 100% of my patience) trying to
find what PL_stack_sp is. This is just *one* identifier out of
thousands in the Perl source. At this rate it will take me many
months of solid work to have a sense of where things are *defined*,
let alone figuring out what they do or how they're used.
And yes, I grepped "stack_sp" in perlxstut, perlxs, perlapi, and
perlguts, and pored over Extending and Embedding Perl by Jenness
and Cozens.
The best I was able to find (and purely by random accident, BTW)
is that it is a macro defined in perlapi.h as
(*Perl_Tstack_sp_ptr(aTHX))
Great. More wild goose chases ahead. I have not been able to find
where aTHX is defined. I looked in perlapi.h, and in all the files
#include'd in it, and all the files included by those, etc. Plus
a huge list of other files (configuration files, make files, etc.),
too long to fully enumerate. aTHX is not even mentioned in any of
these.
Doing a recursive grep for Perl_Tstack_sp_ptr in the Perl source
turns up *nothing*, other than the occurrences of this identifier
in the RHS of some definitions (such as PL_stack_sp) in perlapi.h.
So, after hours of searching all I know is that PL_stack_sp is
defined in terms of things I cannot find definitions for.
OK, so what's the trick? How does one navigate this insanity?
Thanks!
kj
Perl source. How can *anyone* navigate this maze? It's insane.
(And how can the Perl community defend itself against the common
charge of Perl's unreadability, when all a critic needs to do is
point to the Perl source itself for an unparalleled example of
illegibility? Granted, the Perl source is not written in Perl,
but it is obviously written by people who don't give a fig about
the readability of the code. All the piousness in the umpteen Perl
style guides begins to ring hollow after one takes a look at the
Perl source.)
I've spent a couple of hours (and 100% of my patience) trying to
find what PL_stack_sp is. This is just *one* identifier out of
thousands in the Perl source. At this rate it will take me many
months of solid work to have a sense of where things are *defined*,
let alone figuring out what they do or how they're used.
And yes, I grepped "stack_sp" in perlxstut, perlxs, perlapi, and
perlguts, and pored over Extending and Embedding Perl by Jenness
and Cozens.
The best I was able to find (and purely by random accident, BTW)
is that it is a macro defined in perlapi.h as
(*Perl_Tstack_sp_ptr(aTHX))
Great. More wild goose chases ahead. I have not been able to find
where aTHX is defined. I looked in perlapi.h, and in all the files
#include'd in it, and all the files included by those, etc. Plus
a huge list of other files (configuration files, make files, etc.),
too long to fully enumerate. aTHX is not even mentioned in any of
these.
Doing a recursive grep for Perl_Tstack_sp_ptr in the Perl source
turns up *nothing*, other than the occurrences of this identifier
in the RHS of some definitions (such as PL_stack_sp) in perlapi.h.
So, after hours of searching all I know is that PL_stack_sp is
defined in terms of things I cannot find definitions for.
OK, so what's the trick? How does one navigate this insanity?
Thanks!
kj