Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Perl 6 Now: The Core Ideas Illustrated with Perl 5

by Mr. Muskrat (Canon)
on Apr 24, 2005 at 22:11 UTC ( #451047=bookreview: print w/replies, xml ) Need Help??
Order Perl 6 Now: The Core Ideas Illustrated with Perl 5

Item Description: Perl 6 Now: The Core Ideas Illustrated with Perl 5

Review Synopsis: Shows you how to start preparing for Perl 6.

Author: Scott Walters
Published by: Apress

This book will show you how to start writing Perl 6 code, well, now. The example scripts are written in Perl 5, Perl 6 and some that are a combination of the two. The author guides you through creating variables and accessing the data in them. You will find out how to save memory by only using the OO variable types when you need them. You will see first hand how to use the new switch statement and the cool new blocks (KEEP{}, UNDO{} and CATCH{}) all before you have made it halfway through the book.

Part One - Basics, Data Flow, and Program Flow contains the first three chapters and is the worst part of the book in my opinion. In the introduction, Scott says that "the primary audience is Perl 5 programmers who are curious (and in many cases, anxious) about Perl 6." Because of this, the first chapter felt totally out of place in this book. The information leading up to the section on "Getting and Building Perl" could have been put into a new chapter with some of the information from the extremely long introduction (twelve pages). The rest of the chapter ("Getting and Building Perl", "Installing Modules", "Datatypes") should have summed up in a sentence or two at the end of the introduction with links to relevant information. The second chapter is a pleasant read that covers the basics such as the language specifications and implementation, Parrot and PONIE. (Pugs is not mentioned because the book went to press before its inception.) Chapter three is supposed to be about stricture but it covers much more than that. The latter part of the chapter discusses things that usually go hand in hand with strictures but are really outside of the scope of strictures: warnings, "Avoid Reinventing Wheels" and security concerns. These extra topics could have been given a chapter of their own and explained in more detail with an eye on how to do it in Perl 6.

Part Two - Variables, Arrays, and Control Structures covers the gamut from constants, the basic data types, variables, and operators all the way to subroutines, blocks and the new switch statement. You'll see how to create and use the various data structures in Perl 6 with equivalent Perl 5 code to help you understand it all. Most of the information will be familiar but some things have changed in Perl 6 (accessing an array element for example).

The five chapters in Part Three - Threads and Objects discuss CPAN Modules, Objects, Exceptions, Type Safety and Multithreading. The chapter on modules will be a rehash of information for anyone who's been using Perl 5 for a while. Objects not only shows you how to create objects but explains the new "object context" as well as attributes, properties and roles. The chapter on exceptions is no exception; there are plenty of code examples to help you understand the new Perl 6 exception objects. Readers will want to pay close attention to the multithreading chapter; while threads are available in Perl 5, they are not exactly usable.

The last part of the book is not intended for Perl initiates; the chapter titles are Any and All, Lexical Closures, Continuations and Coroutines. Chapter 18 explains how Perl 6 has added the any(), all() and one() functions as well as the | (any) and & (all) operators and how you can use them. The chapter on closures shows you a new way to create a closure and explains closures in great detail. Continuations and coroutines are new in the Perl 6 core but their chapters only have Perl 5 examples using the Coro modules.

Overall, I rate this book 8 out of 10. If you haven't been following the Apocolypses and Exegeses, then this will definitely get you up to speed on Perl 6.


I would like to give a special thanks to diotalevi and erix for providing feedback prior to this being posted.

  • Comment on Perl 6 Now: The Core Ideas Illustrated with Perl 5
Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: bookreview [id://451047]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2022-08-13 15:19 GMT
Find Nodes?
    Voting Booth?

    No recent polls found