Extending and Embedding Perl
Extending and Embedding Perl by Tim Jenness and Simon Cozens
Manning Publications, 2003
Nothing instills more fear in the average Perl programmer than working with XS, Perl's technology for interfacing with eXternal Subroutines in other languages, most notably C. Calling C libraries from Perl is a delicate science, as is the related technique of embedding the entire Perl interpreter into an existing C program. Not every Perl programmer needs to do such things, but when faced with the task, it's hard work.
Written by two respected members of the Perl community, Extending and Embedding Perl attempts to address the needs of such programmers. It covers a lot of ground: XS, the Perl API, alternatives to XS, embedding, the Perl internals, compiling and the Perl development process.
I particularly liked the use of real examples (and working source code) when discussing various aspects of this technology. There are code snippets from Tk, Apache::mod_perl and the Perl sources. I also liked how the authors often would present an obvious solution to a problem, only to highlight its shortcomings, refine the initial solution and then present the improvement. This made the book's material real and useful.
I don't agree with the authors' assumption that they provide enough C in the two chapters they devote to the language. Programmers already competent in Perl and C will get the most from this book. If all you know is Perl, you'll likely struggle with the material. This is not really the authors' fault: XS isn't easy, and the style of C that's used within the Perl sources and the XS interface is somewhat obscure (that's being kind). I was amazed how often I found myself looking at the presented C code and shuddering. That aside, this book is a welcome addition to the arsenal of Perl books. It should help with demystifying XS and associated technologies. As to whether Extending and Embedding Perl is a book for every Perl programmer, I'd have to say it is not. However, if you do need it, you will find it an invaluable reference.
- Readers' Choice Awards 2013
- Mars Needs Women
- RSS Feeds
- Sublime Text: One Editor to Rule Them All?
- December 2013 Issue of Linux Journal: Readers' Choice
- Raspberry Pi: the Perfect Home Server
- Linux Systems Administrator
- IBM Will Minimize Impact of Future Disasters
- Senior Perl Developer
- Technical Support Rep
- why is GNOME 3 in the fifth position at 14.1 %?
5 hours 26 min ago
- Sublime Is Brilliant!
10 hours 29 min ago
10 hours 49 min ago
- Rapid[Disk,Cache] better than native ram caching?
11 hours 14 min ago
- Nothing is perfect
11 hours 27 min ago
- Mixtapes Community
17 hours 6 min ago
- KDE is one true DE
17 hours 40 min ago
- Command Line Shells (Bash, Zsh, etc.) are 2nd place
18 hours 9 min ago
20 hours 4 min ago
- yes it's Jupiter Broadcasting
21 hours 23 min ago