Showing posts with label Perl. Show all posts
Showing posts with label Perl. Show all posts

Tuesday, February 22, 2011

Advanced Perl Programming, Second Edition



Advanced Perl Programming, Second Edition
| 2005-06-28 00:00:00 | | 304 | Perl


With a worldwide community of users and more than a million dedicated programmers, Perl has proven to be the most effective language for the latest trends in computing and business.

Every programmer must keep up with the latest tools and techniques. This updated version of `Advanced Perl Programming` from O'Reilly gives you the essential knowledge of the modern Perl programmer. Whatever your current level of Perl expertise, this book will help you push your skills to the next level and become a more accomplished programmer.

O'Reilly's most high-level Perl tutorial to date, `Advanced Perl Programming,` Second Edition teaches you all the complex techniques for production-ready Perl programs. This completely updated guide clearly explains concepts such as introspection, overriding built-ins, extending Perl's object-oriented model, and testing your code for greater stability.

Other topics include:

Complex data structures

Parsing

Templating toolkits

Working with natural language data

Unicode

Interaction with C and other languages

In addition, this guide demystifies once complex topics like object-relational mapping and event-based development-arming you with everything you need to completely upgrade your skills.

Praise for the Second Edition:

`Sometimes the biggest hurdle to problem solving isn't the subject itself but rather the sheer number of modules Perl provides. `Advanced Perl Programming` walks you through Perl's TMTOWTDI (`There's More Than One Way To Do It`) forest, explaining and comparing the best modules for each task so you can intelligently apply them in a variety of situations.` --Rocco Caputo, lead developer of POE

`It has beensaid that sufficiently advanced Perl code is indistinguishable from magic. This book of spells goes a long way to unlocking those secrets. It has the power to transform the most humble programmer into a Perl wizard.` --Andy Wardley

`The information here isn't theoretical. It presents tools and techniques for solving real problems cleanly and elegantly.` --Curtis 'Ovid' Poe

` `Advanced Perl Programming` collects hard-earned knowledge from some of the best programmers in the Perl community, and explains it in a way that even novices can apply immediately.` --chromatic, Editor of Perl.com

User review
more a guide to CPAN than to the Perl language
In his preface to Advanced Perl Programming, 2nd Edition, Simon Cozens says that the focus in Perl programming has shifted, since the first edition, from techniques to resources. Rather than write really good new code, authors rely on the CPAN to find existing code and use that to solve the unoriginal parts of their problems. To cater to the discerning Perl programmer, then, the book has been completely rewritten. Instead of covering the parts of the Perl programming language that are often unexploited by more novice hackers, APP2 focuses on providing an overview of some of the major solved problems in Perl, and the modules that provide some of the solutions.


Only Chapter 1, `Advanced Techniques,` bears much resemblance to the previous edition of APP. It covers subject matter closer to the language than to the modules involved: globs, CORE::, objects, B, and compilation. Each subsequent chapters discusses a common programming problem, shows off a few existing solutions (in the form of code on the CPAN), and sometimes demonstrates how to put those existing solutions to use. Among the topics covered are parsing, templating, serialization, unicode, and testing. POE, Inline, and Acme also get a chapter each.


Simon's writing is, as always, lucid and easy to follow. He provides good example problems, and he builds solutions that tend to do a good job of selling the modules on display. I must admit to feeling compelled to go do more with POE and some of the Lingua:: tools, after finishing their respective chapters.


In the end, though, I felt unfulfilled. While APP1 was not one of O'Reilly's best Perl books, it delivered what it promised: advanced techniques for writing Perl code. What APP2 delivers is a guide to avoiding the need for advanced techniques. It will save you from needing to use the strangest bits of Perl, not show you how. (The back cover quotes Andy Wardley as saying, `This book of spells goes a long way to unlocking those secrets [of advanced Perl code.]` I think, rather, that it just teaches the incantations.)


Perhaps my disappointment is predicated entirely on my incorrect expectations. If this book had been called `Leveraging the CPAN,` I'd probably consider it a great success. You may, instead, be interested in Intermediate Perl or Mastering Perl.

User review
A very different beast to the first edition
As other reviewers have noted, there's not a whole lot in common with the first edition of this book, either in feel or content. It's rather questionable whether this merits being called a second edition. Something like 'Problem solving with CPAN' would be a more accurate title (then again, perhaps it's just as well I don't work in the publishing industry).


It does still cover some of the material of the first edition, such as globs, closures, AUTOLOAD, the Perl class model, and some Perl internals, but it's all been compressed into one chapter.


The other chapters discuss various subjects using CPAN modules and gives some insight into how the material from the first chapter was used to solve these problems. A wide variety of issues are discussed, including serialization and object relational mapping, natural language parsing, templating and unicode. Some superficially similar material could be found in Perl Cookbook, but the discussion here is deeper (and more up to date), there's very little overlap.


Exactly how much you get out of the book will probably be dependent on how well you know the innards of CPAN and how interesting you find the topics. I liked the parsing and natural language processing chapters a lot, and the chapter on inlining code from other languages was diverting; conversely, I can't bring myself to find Unicode even remotely stimulating, and the POE (some sort of event-based framework) chapter didn't do much for me. The testing chapter is a solid addition to the material in Intermediate Perl, and I picked up some pointers to modules to check out, but it didn't feel all that advanced.


This is a book that fits in quite nicely with Intermediate Perl and Programming Perl -- it cleans up a few niggling details not well discussed in the former book, without having the intimidating heft of the latter, and also provides a wide ranging overview of several topics and the CPAN solutions for them. As such, it will bring an intermediate programmer up a few notches.


Already advanced Perl programmers may be disappointed, and those hoping for an updated version of the first edition will definitely be out of luck, but if you know what you're getting, and evaluate it on those terms, rather than what the title suggests, I think you'll enjoy it.

User review
Very disappointing
This book was slated to come out for a long time before it actually did, and I naturally assumed that Simon was working on something ambitious and that it was taking him longer than he planned. I bought it sight-unseen, but quickly discovered it was more of a tour of CPAN than an in-depth book deserving of the title Advanced Perl Programming. I know from his blog that Simon was wrapping up his life to go be a missionary in Japan, so now I think the book was late because he was working on *that* project after he had agreed to write this book. Just speculation.


It reads more like an article on Perl.com or in the Perl Journal, and could easily have been several articles spread out over a few months. I have to wonder if he started the book with the idea that `advanced` means `knowing about useful modules on CPAN` or if the idea came to him sometime after it was clear the book was running late.


Regardless, consider looking at it if you see it in the store. It's not without its value, but I can't see paying for a book that mostly says, `Here's someone else's work to check out.` An advanced book ought to be getting into -- well -- advanced techniques, useful info that's hard to come by, something that isn't ALREADY AVAILABLE ELSEWHERE.

User review
First edition is what you want, not this one.
The book is a big disappointment. I picked this book because I had bought the first version few years back and looked for an upgrade. It turns out to be a new book - from content, style, to author. For instance, the 'template tools' chapter is just a recite of the man pages, accompanied with poor examples, and explanation is less than helpful.

User review
`Second Edition`? Should be `Volume 2`!
Review: Advanced Perl Programming


The First Edition of this book is one of my favorite books. For an example of why, it explained anonymous structures clearer than anyplace else I had seen. I have re-read it several times, learning something new with each reading. If you have gotten through `Learning Perl`, and want to become an advanced Perl programmer, get yourself a copy of the First Edition.


Why is this book is the `Second Edition` of anything? It bears no resemblance at all to the First Edition. It has a different author, which is the first red flag. Looking inside, we find that all the chapters have different titles, and there is no topic discussed in one book that is discussed in the other. Most of what is in the First Edition is still valid Perl, and important information for a Perl programmer to know. Within a few minutes of learning this Second Edition had been published, I ordered it, based on my love of the First Edition. If I had spent any time looking through it, I probably wouldn't have bought it.


This book covers advanced Perl constructs and topics, but those much less useful to the average `another Perl hacker`. It is interesting to know some of the stuff in the 2E, perhaps from an academic perspective, but there is none of the, `Wow, I'm going to use this every day` feeling that I got with the 1E.


To be fair, this book is well written, and clearly explains some things I've `always wondered about`. There are several topics covered that I wish had been covered in more depth. For example, there is exactly one sentence about Inline::Java. But, I am glad that I bought it, and will put it on my shelf next to the First Edition. In thinking about it, I would say that this book should have been called, `Advanced Perl Programming, Volume 2` (with two panthers on the front?) Meanwhile, it is true that Sriram's First Edition could use some updating. After Perl 6 is released?


Download this book!

Free Ebooks Download

Sunday, January 23, 2011

Effective Perl Programming: Writing Better Programs With Perl



Effective Perl Programming: Writing Better Programs With Perl
| 1997-12-30 00:00:00 | | 0 | Perl


Effective Perl Programming is a gem of a Perl book. Its author, Joseph Hall, is a well-known Perl instructor and frequent poster on the seminal comp.lang.perl.misc newsgroup. The book's technical editor is none other than Randal Schwartz, noted Net personality, enigmatic author of Learning Perl, and contributor to Programming Perl.

Hall has distilled his years of Perl experience into a book for Perl programmers that is both fluid and fun to read. It's somewhat like reading the Perl FAQ; even when you think you know everything, there's so much you don't know.

Effective Perl Programming has a clear layout: the text is easy on the eyes and the monospaced font makes a clear distinction between backticks and single quotes. Hall uses his PEGS (PErl Graphical Structures) notation to show the difference between Perl's different types of data structures and how everything ties together.

Packed with great examples and code snippets, this book is an excellent source of tips and tricks to make your Perl programs faster and easier to read. You'll also find a strong section on using the Perl debugger to improve your Perl programming skills. In yet another section, Hall walks the reader through the creation of a complete XS module that can boost the performance of array shuffling eight-fold. All in all, this is a great book for programmers who want to move beyond plain, verbose Perl toward a more succinct and powerful coding style.

User review
Right ways to write Perl
A language reference book that's a page-turner? Yes, it can happen, and Hall and Schwartz have done it. At least one right way to almost anything in Perl that you might want to do, and then some. Clear, concise, no-nonsense guidance and explanations. What else can I say -- I wish I had a book like this for C!

User review
great book
this book is `MUST HAVE` Perl book!

It gives you great idea to simply your code and algorithm.

User review
A fast track to idiomatic Perl
This is a good book for getting a handle on intermediate level Perl and its idiomatic uses, arranged as a series of 60 'items' -- the debt to Effective C++ is obvious. This is not a tutorial on Perl, you should at least be at the level of The Llama and ideally be somewhat acquainted with the material covered in The Alpaca, too. Although similar ground is covered in this book to the latter, I would treat this book as a way to shore up your previous knowledge, rather than learning it for the first time.


The content holds up surprisingly well for 1997. The opening chapters cover a lot of the oddities and gotchas of life with Perl, such as slicing, the various connotations of undef, a persuasive defence of $_ and where + is necessary to disambiguate. The final 'miscellany' chapter also contains useful information in a similar vein. And this also appears to be one of the first books to detail the now famous Schwartzian transform and the Orcish manoeuvre for sorting, so it has a certain historical appeal.


Equally, the chapters on debugging, references, regular expressions and object oriented programming are also pretty good. It's just that there are now several other books that cover these topics. If you only want one book in this style, Perl Best Practices bestrides the field like a colossus, being more comprehensive, and better written. Not that there's anything wrong with the writing here, it's never boring as such, but it does feel flat.


Nonetheless, Effective Perl Programming does the job it sets out to do fairly well, and I find you can never have too much help in explaining the nooks and crannies of idiomatic Perl, so this is still worth getting hold of, particularly because you can find it at an extremely reasonable price.

User review
Terrific Book
I'm fairly new to Perl (but not to programming) and this book is great. I really like the format of the code examples, and there's a lot of wisdom here on writing good, idiomatic Perl.

User review
Great Perl Book
This book shows you some efficient and interesting ways of using Perl. It is very informative and I often use it when I want to see if there is a better way of doing something.


Download this book!

Free Ebooks Download

Tuesday, January 11, 2011

Automating System Administration with Perl: Tools to Make You More Efficient



Automating System Administration with Perl: Tools to Make You More Efficient
| 2009-05-29 00:00:00 | | 0 | Perl


If you do systems administration work of any kind, you have to deal with the growing complexity of your environment and increasing demands on your time. Automating System Administration with Perl, Second Edition, not only offers you the right tools for your job, but also suggests the best way to approach specific problems and to securely automate recurring tasks. Updated and expanded to cover the latest operating systems, technologies, and Perl modules, this edition of the `Otter Book` will help you: Manage user accounts
Monitor filesystems and processes
Work with configuration files in important formats such as XML and YAML
Administer databases, including MySQL, MS-SQL, and Oracle with DBI
Work with directory services like LDAP and Active Directory
Script email protocols and spam control
Effectively create, handle, and analyze log files Administer network name and configuration services, including NIS, DNS and DHCP
Maintain, monitor, and map network services, using technologies and tools such as SNMP, nmap, libpcap, GraphViz and RRDtool Improve filesystem, process, and network security

This edition includes additional appendixes to get you up to speed on technologies such as XML/XPath, LDAP, SNMP, and SQL. With this book in hand and Perl in your toolbox, you can do more with less--fewer resources, less effort, and far less hassle.



User review
Useful, inspiring - and fun!
As one of the reviewers for Automating System Administration with Perl,

I can only rabidly recommend the work as some of the best I have seen

lately on both subjects (Perl and System Administration).

User review
Wish for More,,.
I rely on a substantial collection of O'Reilly references on a day-to-day basis. Therefore I am sad to say this book has collected quite a bit of dust on my bookshelf.


I like the concept of the book (I bought it, after all), but it seems to try to do too much.


To be sure, the topics included are worthwhile, and essential to any sysadmin arsenal. Unfortunately, I do not believe the author fully covers them in depth. IMHO the book would be greatly improved by focusing on a particular O/S (and I'm not advocating one,,,,,,just pick ONE), rather than trying to be a go-to reference for [U]nix and Windows admins alike.


Topic coverage in this book leaves something to be desired. It seems like the author said, `Here is how to do an LDAP search with Perl. Moving on to AD, here's how you do an LDAP search. Here's how to manage users in [U]nix; now here's how to do it in Windows.`


Save your money, instead invest in Automating Linux and Unix System Administration, Second Edition (Expert's Voice in Linux) for an engaging, useful book (barring the CFengine portion).

User review
The Otter Book never leaves my side
Perl occupies the sweet spot between shell scripting and C programming, with the ability to lean as far as you'd like in either direction. As a sysadmin, Perl is better than a tool -- its the perfect tool for building tools, and this book is at the top of a very short list of texts which help bring to bear the full power of the best language for cutting down complex tasks down to size.


I've read a lot of Perl books and I own most of the O'Reilly books on the topic. The Otter Book, however, is the one which I cart around with me in my laptop bag wherever I go and is the first place I look for hints on how to attack problems that I face at work or home. It's chocked full of working examples and hints and tips on how to customize them, as well as plenty of context as to why these suggestions work the way they do.


The book is very well written and I highly recommend it to anyone, whether they are a professional admin or just want to cut out some of the repetitive tasks of managing their own workstation.

User review
Excellent update to a classic
The original Otter book was published in 2000, and had a place on just about every sysadmin's shelf as well as most anyone who regularly used Perl. I expect this new 2009 edition will likewise be a `must have` for anyone serious about System Administration and Perl (and any Perl coder, really, given the wide range of topics). While it will likely serve as an excellent reference, I'd also recommend this edition to newcomers to Perl (up there with Llama, Camel and Perl Cookbook) due to the `real world` nature of the tasks covered and the author's obvious depth of knowledge and wealth of experience.


This edition is much updated from the 2000 original, with four new chapters (`Working with Configuration Files` and `Experiential Learning` being two favorites of mine) and two new appendices (including the `10 minute XPath tutorial). Some of what I like best about the book is the exploration of `best of breed` CPAN modules and `Pros and Cons` sections that compare modules for particular tasks. All-in-all very highly recommended!

User review
Topics include spam control, analyzing log files, working with different configuration file formats, and more
AUTOMATING SYSTEM ADMINISTRATION WITH PERL by David N. Blank-Edelman appears in its second updated edition for any systems administrator working with Perl. It's been updated and expanded to include the latest operating systems and technologies and replaces an outdated version, so is key for any serious Perl computing collection. Topics include spam control, analyzing log files, working with different configuration file formats, and more.




Download this book!

Free Ebooks Download