Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • For what it is worth, I have been diving into the perl/c goodness in the mod_perl innards as I hack away, so maybe I have something useful to say here. I am a mediocre C programmer (just don't use it that much when I can use Perl), but I know enough to read the C constructs without having to go to the reference book.

    So first off, if you don't know C, go get a intro to C book or something like that to at least get an idea of the way functions/variables are typed, etc. Understand what a struct is (think object in some ways). Understand the different data types (char, int, etc.). Take a stab at understanding pointers (char *), but don't quit if you don't understand those right away. Understand how header files are used, #include "foo.h", think use Foo;. Go write hello world in C to get your feet wet.

    Now go read some perl source code :) When you run into the idioms you don't see in the C book (SV), go perldoc perlguts and search for that idiom. That has been fairly helpful to me in identifying the basic structures such as SVs and CVs. That document is not light reading, so I have mainly used it for reference. Go read about pTHX_ in perlguts, that's a big one that I wish I had read about sooner. Go read Perlguts Illustrated [gisle.aas.no] (may need to find a cached copy).

    If you've gotten this far, go try to write some code now, figure out how to implement something you want. It might turn out that you've picked a difficult problem instead of an easy one and you won't make much progress, but you'll learn something, and that process is invaluable. Good luck, please let me know if you find other good resources on this subject.