Foreword
Perl’s object-oriented mechanism is classic prestidigitation. It takes a collection of Perl’s existing non-OO features such as packages, references, hashes, arrays, subroutines, and modules, and then–with nothing up its sleeve–manages to conjure up fully functional objects, classes, and methods. Seemingly out of nowhere.
That’s a great trick. It means you can build on your existing Perl knowledge and ease your way into OO Perl development, without first needing to conquer a mountain of new syntax or navigate an ocean of new techniques. It also means you can progressively fine-tune OO Perl to meet your own needs, by selecting from the existing constructs the one that best suits your task.
But there’s a problem. Since Perl co-opts packages, references, hashes, arrays, subroutines, and modules as the basis of its OO mechanism, to use OO Perl you already need to understand packages, references, hashes, arrays, subroutines, and modules.
And there’s the rub. The learning curve hasn’t been eliminated; it’s merely been pushed back half a dozen steps.
So then: how are you going to learn everything you need to know about non-OO Perl so you can start to learn everything you need to know about OO Perl?
This book is the answer. In the following pages, Randal draws on two decades of using Perl, and four decades of watching Gilligan’s Island and Mr. Ed, to explain each of the components of Perl that collectively underpin its OO features. And, better still, he then goes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access