An explanation of how to expand the functionality and usefulness of the Perl programming language, this guide delves into the complex issues of using real code examples from the Perl source. Detailed is how to use Perl from C programs, such as writing interfaces to C libraries, techniques on implementing Perl callbacks for C libraries, passing Perl hashes and arrays between Perl and C. Additionally, developers are provided with an API reference for the internal C interface to Perl and a reference on the typemap system.
Publisher:
Manning Publications
Authors:
Tim Jenness, Simon Cozens
Release Date: 2002-08
ISBN/EAN: 1930110820 / 9781930110823
New Price: $16.20 /
Used Price: $8.90 /
Collectible Price: n.a. Buy
it Now!
Average Rating: 4.5
Number of
Reviews: 8
Beyond using Perl
Rating:
After being a Perl programmer for a while, you'll probably want to go deeper than that and perhaps enable some features that can not be done through the pure Perl code. That's when you'll need XS; the nasty, weird and hard thing that glues the external code with Perl code. While there are some tutorials and perldocs on this subject, this books seems to be the most friendly and comprehensive for the XS beginner.
Total Votes: 0, Helpful Votes: 0, Date: 2008-09-07
Want to dive deep into perl? Get this book
Rating:
The most concise book ever on demistfying the dreaded XS. The information found in the book is not a collection from PODs or from the Tiger, Camel books. Top down approch step by step explanaiton, and best of all very detailed explanation of C code. The author, with great effort illustrates C code by chunks and explains them. Much better approach then line by line explanation in which you generally get lost, or than summarizing the code leaving you to understand the design criteria written in two lines of code for more than half an hour.
If you are a skilled Perl developer and would like to interface libraries or create modules written in C, this is the book for you. I wish I've come across this book earlier. I couldh have saved man months of work.
Total Votes: 3, Helpful Votes: 3, Date: 2004-12-31
A good book, but leaves windows programmers short
Rating:
We bought this book as part of a project we were doing in windows. We were trying to integrate perl scripting as a macro language in an existing application. Although we couldn't have done it without this book, there were still a lot of unanswered questions. The book is short on details about the build process and is focused on the unix-like command line environment. (We are now quite good at integrating perl into windows GUI apps. Contact us at www.ubcomputer.com if you're interested in our services!)
Total Votes: 10, Helpful Votes: 2, Date: 2003-08-28
There and Back Again
Rating:
Extending and Embedding Perl is as it boldly states on the cover: "The definitive guide to XS, embedding, and the Perl internals". This book is well organized and information dense. One could spend days sifting through the available perlapi, perlcall, perlembed, perlguts perlxs, perlxstut, and h2xs documentation. After which you'll probably understand very well references to nethack's "You are in a maze of twisty little passages all alike". Or you could get yourself a copy of this book and find your way out of the maze.
Most of the available documentation on extending and embedding perl is written from the prospective of the core perl developers for core perl developers. This book is written for advanced Perl programmers who for whatever reason need or wish to peer into that netherworld between Perl, C, and the glue that interface Perl with other languages. It is a deliberate thorough guide led by authors that are both extremely knowledgeable and also capable of communicating that knowledge.
While it would greatly reduce the learning curve, no prior knowledge of C is required to read this book. This is a surprising claim and while it won't be easy, this reader is proof that someone with little true knowledge of C can in fact read and for the most part comprehend what the authors wish to convey.
There are clearly areas for improvement. Things like NULL being used throughout chapter 3, only to finally be defined later in a footnote in chapter 4. And other cases of terms being used before they are explained. Things that leave the reader juggling unnecessarily until the information is provided that lets understanding fall into place. But for the most part, if you are a competent juggler and are patient your questions will eventually be answered. You won't walk away a C programmer, but you will learn enough to solve the problems which led you to consider reading this book in the first place.
One thing I liked very much about the layout of the book is how it switches back between presenting sections on C programming and Perl. The authors revisit C each time it is necessary to understand the next Perl internals topic. Those that are learning C or need the review receive the relevant information just before it is required.
Over the course of the book, you'll learn about interfacing from Perl to C and C back to Perl. For those that must plug references to Tolkien in things Perl... you can go back and rephase that into an appropriate reference to Bilbo's book "There and Back Again". You'll also learn the perl api, data structures for core variable types, and how to work with scalars, arrays, hashes, strings, regular expressions, file handles, typeglobs, objects, callbacks and PDL with C and C++. And there is even mention of working with Fortran, Java, and more esoteric alternatives.
The book finishes with an in depth look at Perl internals: the parser, tokenizer, op code trees, execution, and compiler. And closes with a discussion of the Perl development process: How it may be monitored and participated in.
What's missing? Detailed coverage of the I/O subsystem and the regular expression engine. I.e., topics which might themselves make for a good book. There was also light coverage on things like scratchpads. There were times while reading when I didn't know whether the issue being discussed was fully covered or curtailed. But you will certainly find better coverage of the issues in this book than elsewhere. This is an impressive book. I hope it will greatly influence the way Perl6 internals are documented.
Total Votes: 11, Helpful Votes: 9, Date: 2003-03-23
This book belongs on your bookshelf
Rating:
I really fell in love with this book as I read through it. It does an excellent job of explaining the hairy details of working with Perl at the C level, whether etending Perl (the bulk of this book), embedding it in other apps, or hacking the guts.
I haven't found any other books that try to fill this space, but even if there were this would still be the book to buy!
Total Votes: 5, Helpful Votes: 4, Date: 2003-01-29
Beyond using Perl
Rating:
After being a Perl programmer for a while, you'll probably want to go deeper than that and perhaps enable some features that can not be done through the pure Perl code. That's when you'll need XS; the nasty, weird and hard thing that glues the external code with Perl code. While there are some tutorials and perldocs on this subject, this books seems to be the most friendly and comprehensive for the XS beginner.
Total Votes: 0, Helpful Votes: 0, Date: 2008-09-07
Want to dive deep into perl? Get this book
Rating:
The most concise book ever on demistfying the dreaded XS. The information found in the book is not a collection from PODs or from the Tiger, Camel books. Top down approch step by step explanaiton, and best of all very detailed explanation of C code. The author, with great effort illustrates C code by chunks and explains them. Much better approach then line by line explanation in which you generally get lost, or than summarizing the code leaving you to understand the design criteria written in two lines of code for more than half an hour.
If you are a skilled Perl developer and would like to interface libraries or create modules written in C, this is the book for you. I wish I've come across this book earlier. I couldh have saved man months of work.
Total Votes: 3, Helpful Votes: 3, Date: 2004-12-31
A good book, but leaves windows programmers short
Rating:
We bought this book as part of a project we were doing in windows. We were trying to integrate perl scripting as a macro language in an existing application. Although we couldn't have done it without this book, there were still a lot of unanswered questions. The book is short on details about the build process and is focused on the unix-like command line environment. (We are now quite good at integrating perl into windows GUI apps. Contact us at www.ubcomputer.com if you're interested in our services!)
Total Votes: 10, Helpful Votes: 2, Date: 2003-08-28
There and Back Again
Rating:
Extending and Embedding Perl is as it boldly states on the cover: "The definitive guide to XS, embedding, and the Perl internals". This book is well organized and information dense. One could spend days sifting through the available perlapi, perlcall, perlembed, perlguts perlxs, perlxstut, and h2xs documentation. After which you'll probably understand very well references to nethack's "You are in a maze of twisty little passages all alike". Or you could get yourself a copy of this book and find your way out of the maze.
Most of the available documentation on extending and embedding perl is written from the prospective of the core perl developers for core perl developers. This book is written for advanced Perl programmers who for whatever reason need or wish to peer into that netherworld between Perl, C, and the glue that interface Perl with other languages. It is a deliberate thorough guide led by authors that are both extremely knowledgeable and also capable of communicating that knowledge.
While it would greatly reduce the learning curve, no prior knowledge of C is required to read this book. This is a surprising claim and while it won't be easy, this reader is proof that someone with little true knowledge of C can in fact read and for the most part comprehend what the authors wish to convey.
There are clearly areas for improvement. Things like NULL being used throughout chapter 3, only to finally be defined later in a footnote in chapter 4. And other cases of terms being used before they are explained. Things that leave the reader juggling unnecessarily until the information is provided that lets understanding fall into place. But for the most part, if you are a competent juggler and are patient your questions will eventually be answered. You won't walk away a C programmer, but you will learn enough to solve the problems which led you to consider reading this book in the first place.
One thing I liked very much about the layout of the book is how it switches back between presenting sections on C programming and Perl. The authors revisit C each time it is necessary to understand the next Perl internals topic. Those that are learning C or need the review receive the relevant information just before it is required.
Over the course of the book, you'll learn about interfacing from Perl to C and C back to Perl. For those that must plug references to Tolkien in things Perl... you can go back and rephase that into an appropriate reference to Bilbo's book "There and Back Again". You'll also learn the perl api, data structures for core variable types, and how to work with scalars, arrays, hashes, strings, regular expressions, file handles, typeglobs, objects, callbacks and PDL with C and C++. And there is even mention of working with Fortran, Java, and more esoteric alternatives.
The book finishes with an in depth look at Perl internals: the parser, tokenizer, op code trees, execution, and compiler. And closes with a discussion of the Perl development process: How it may be monitored and participated in.
What's missing? Detailed coverage of the I/O subsystem and the regular expression engine. I.e., topics which might themselves make for a good book. There was also light coverage on things like scratchpads. There were times while reading when I didn't know whether the issue being discussed was fully covered or curtailed. But you will certainly find better coverage of the issues in this book than elsewhere. This is an impressive book. I hope it will greatly influence the way Perl6 internals are documented.
Total Votes: 11, Helpful Votes: 9, Date: 2003-03-23
This book belongs on your bookshelf
Rating:
I really fell in love with this book as I read through it. It does an excellent job of explaining the hairy details of working with Perl at the C level, whether etending Perl (the bulk of this book), embedding it in other apps, or hacking the guts.
I haven't found any other books that try to fill this space, but even if there were this would still be the book to buy!
Total Votes: 5, Helpful Votes: 4, Date: 2003-01-29