in reply to Programmation avancée en Perl

Advanced programming in Perl

INTRODUCTION

I have mixed feelings about this book.
I was looking for a book about Perl internals,
which would go a little bit further than the Camel and which would be a little bit easier to grapple with than Perl sources.
This book partially met my expectations. I found an interesting book on several accounts, with an excellent technical level but some aspects (which I'll detaill below) noticeably reduce this book's value.

PRESENTATION

Advanced programming in Perl includes 412 pages.
It's broken up into 20 chapters :
  1. Data References and Anonymous Storage
  2. Implementing Complex Data Structures
  3. Typeglobs and Symbol Tables
  4. Subroutine References and Closures
  5. Eval
  6. Modules
  7. Object-Oriented Programming
  8. Object Orientation: The Next Few Steps
  9. Tie
  10. Persistence
  11. Implementing Object Persistence
  12. Networking with Sockets
  13. Networking: Implementing RPC
  14. User Interfaces with Tk
  15. GUI Example: Tetris
  16. GUI Example: Perlman
  17. Template-Driven Code Generation
  18. Extending Perl: A First Course
  19. Embedding Perl: The Easy Way
  20. Perl Internals

And 2 appendices :
REVIEW

I don't understand the logic of this layout, and it seems a bit 'disjointed'.
Chapters are, to my mind, quite uneven, some are excellent, others are less good.
Some areas are VERY (too much?) detailed, like the whole chapter 5 about Eval for example, or the 3 chapters about the GUI.

More than the topics presentation order, It's their interest (varied) and the reasons why they were choosed that bother me.
Whatever the author say to justify his choices (these topics were choosed beccause they're what a programmer SHOULD know),
the choice seems arbitrary, and to say the least questionable.
(No chapter about Security ? Sorting ? Obfuscation ?...)

Aside from the above subjective issues, I have 4 specific complaints :
  1. It's not written by a Perl programmer but by someone who knows Perl well.
    This detail is important - I haven't found any passion in this book, hence a book which fails to captivate...
    (As opposed to the Camel, which remains gripping from the beginning to the end...)
  2. More disturbing, some style mistakes seems harmful to me :
    • Use of C/C++ idioms instead of Perlish ones
      Like, for example, the use of this loop
      $lng2=@$rtableau2; for($i;$i<$$lng2;$i++) {...
      instead of foreach loop
      (page 9)
    • No 'use strict' (not even a suggestion to use it)
      and questionable construct like $x{toto} instead of $x{'toto'} (page 44)
    • No lexically scoped variables declaration (page 33,58,231...)
    • 'Soft references' not mentionned as inadvisable, as OeufMayo righlty pointed out
      (read Dominus articles on this topic...)

  3. Written in 1998, it's beginning to show it's age
    With some information on threads and ref incomplete for example...

  4. A tendency from the author to present his modules instead of the 'standard' ones.

But everything isn't bad in this book :
On the good side, we'll notice:

CONCLUSION

This book remains a good book about Perl, less exciting than the CamelBook, less practical than the CookBook,
nonetheless, it contains excellent and detailed information, while being clear and easy to read.
However I just can't refrain from imagining what this book would have been if it would have been written by a Perl fanatic...
And dreaming...
(How long until a book written by our saints?)
;-)