Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Table of Contents

Foreword

Preface
  1. Introduction
  2. Building Larger Programs
  3. Introduction to References
  4. References and Scoping
  5. Manipulating Complex Data Structures
  6. Subroutine References
  7. Practical Reference Tricks
  8. Introduction to Objects
  9. Objects with Data
  10. Object Destruction
  11. Some Advanced Object Topics
  12. Using Modules
  13. Writing a Distribution
  14. Essential Testing
  15. Contributing to CPAN
Appendix.Answers to Exercises
Index

Once again Randal and Tom Phoenix have teamed together to bring us the sequel to Learning Perl, and manage to keep the material both interesting and entertaining as well. Overall this book is much lighter than one would expect (205 pages), which is slightly smaller than Learning Perl. Also provided at the end of each chapter are exercises (with the answers at the end of the book), to help reinforce what the chapter covered.

Chapter One is a brief intro into the book, going over what the average person who reads the book should have an understanding of, as well as some notes for those who will be using the book to teach a class with.

Chapter Two gets into the meat of the book, which how to write programs that are between 100 and 10,000 lines of code. Here, they cover items such as using do and require, packages and lexicals, and scope.

Chapters Three through Seven take on references and show how to create references and then dereference them to get at the data that they represent. Scoping, manipulating complex data structures, reference counting, creating anonymous arrays and hashes, and autovivification are also covered quite thoroughly.

Chapters Eight and Nine were taken word for word from perlboot, which is ok, since the material is still quite relevant (and saved merlyn a bunch of time since he wrote perlboot). However, they did expand the material in perlboot, by covering faster methods of accessing and writing instance data within the object, as well as restricting methods to a class or an instance.

Chapters Ten and Eleven go into object destruction and more advanced topics on objects. Mention is made of the Weaken module, as well as using AUTOLOAD to create accessors. Multiple inheritance and referencing file handles is also covered in these chapters.

Chapter Twelve deals with using modules, such as File::Basename, File::Spec, and Math::BigInt. Randal uses these modules to show the differences between a function-oriented module, such as File::Basename, and object-oriented ones like File::Spec and Math::BigInt. He also goes into detail on using the Exporter module and creating custom import routines.

Chapters Thirteen through Fifteen cover what is needed to create a distribution that will eventually find its way to the CPAN. Using h2xs, writing pod, alternate install locations, writing tests using Test::Simple and Test::More, and how to prepare, upload, and announce your distribution are covered.

For myself, I found the last three chapters to be very informative, and exactly what I was looking for when I wrote this node two years ago. This book answered the few remaining question that I had not managed to answer by trial and error.

Overall, this book was extremely well written, and I encourage all who have read Learning Perl to pick this book up, and add it to their library as a very useful reference guide and learning tool.

In reply to Learning Perl Objects, References and Modules by TStanley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-05-17 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (68 votes). Check out past polls.

    Notices?