×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Learning Perl Objects, References & Modules

timothy posted more than 10 years ago | from the taking-up-the-space-in-your-brain dept.

Perl 158

honestpuck writes "In the world of Perl there was once only the 'camel book,' held in perhaps as much reverence as 'K & R' among C programmers. It certainly appealed to roughly the same audience, those who wanted a short, sharp introduction to a programming language. It was with a problem that needed solving and a copy of the camel book that I started as a Perl programmer." Read on for honestpuck's review of another book he regards at least as highly.

Then for those that wanted a introduction to Perl and programming Randal L. Schwartz wrote Learning Perl, a book that has arguably become the definitive textbook for teaching Perl. The one weakness was that it left off before really getting to the guts of building large, complex projects in Perl. It did not cover classes, objects, breaking your code up into pieces or the more arcane aspects of variables, references. For this we had to resort to the last few chapters of the 'camel book' and I, for one, have never really been totally comfortable at this end of the language; when I'm reading someone else's code it might take a couple of reads to fully understand the process.

Now this weakness has been well and truly addressed. Schwartz, with Tom Phoenix, has written "Learning Perl Objects, References & Modules", a volume that takes the same steady approach to teaching you the more advanced topics as the earlier 'Learning Perl'. Schwartz has spent the years since writing 'Learning Perl' teaching and writing. You can tell, this is a superbly written book, not that 'Learning Perl' wasn't well written; it's just that this volume is far better.

The Guts

The book starts with a chapter on building larger programs that covers @INC, eval, do and require before discussing packages and scope. It then has several chapters on references that explains in well understandable fashion and increasing complexity all the ins and outs of references including dereferencing, nested references, references to subroutines and references to anonymous data before a final chapter on references that gives you some incredibly useful tricks such as sorting and recursively defining complex data.

The book continues with three chapters that give you a solid grounding in Perl objects. Here Schwartz has assumed that you know at least a little about object oriented programming, some may feel the need for more explanation of concepts might be required, but if you've had any experience in OOP before then the clear examples and descriptions here are probably all you want.

Modules are not as well covered, with only a single chapter, but it is hard to think of anything left out, it covers using them and building your own so well that it left me wondering what all the fuss was about, "seems obvious to me." The book concludes with chapters on building a distribution out of your module, testing it using make test (with Test::Harness), Test::Simple and Test::More before a chapter telling you how to contribute to CPAN.

Each chapter of the book concludes with a number of small exercises, designed to be done in just a few minutes, that cement the learning of the previous chapter. The answers to these are at the end of the book.

Conclusion

Once I'd finished I felt I had a much more solid grounding in Perl, certainly I was much better able to understand another programmer's code that dealt with such things as subroutine references and some complex data structures. While the subject matter of this book is almost entirely covered in 'Programming Perl' the tutorial aspects of this book made it much easier going. The style would be familiar to anyone who has read 'Learning Perl', light without being frivolous and extremely well written, Schwartz seems a master at reducing complexity to manageable bites.

This book is deceptively easy to follow, each new idea built onto earlier ones, each new language concept introduced in an easy manner. The writing is excellent, it's hard to explain why I appreciated it so much. That may be the reason, the writing isn't forced or heavy or too light or obvious. It just allows the solid material of the book to shine through. Go to the ubiquitous O'Reilly website and grab the example chapter (the site also has a few Errata, the Table of Contents and the code from the book) and give it a look.

I think this may well become a classic, I may well in ten years time talk of Schwartz's books with the same awe I now talk of Brian Kernighan's. I'll certainly eagerly await his next book and keep this one close until it comes. Oh, and Randal, how about 'Software Tools for Perl Programmers'?


You can purchase Learning Perl Objects, References & Modules from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered

158 comments

first post (-1, Offtopic)

nadim (83776) | more than 10 years ago | (#6616620)

first post

Re:first post (-1)

Anonymous Coward | more than 10 years ago | (#6616665)

I dont recall you discussing this with me. Next time, ask me ahead of time so I wont have to scold you infront of the entire department. You bad bad man.

GNAA! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#6616629)

GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the first organization which
gathers GAY NIGGERS from all over America and abroad for one common goal - being GAY NIGGERS.

Are you GAY [klerck.org] ?
Are you a NIGGER [tux.org] ?
Are you a GAY NIGGER [gay-sex-access.com] ?

If you answered "Yes" to any of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!
Join GNAA (GAY NIGGER ASSOCIATION OF AMERICA) today, and enjoy all the benefits of being a full-time GNAA member.
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the fastest-growing GAY NIGGER community with THOUSANDS of members all over United States of America. You, too, can be a part of GNAA if you join today!

Why not? It's quick and easy - only 3 simple steps!

First, you have to obtain a copy of GAY NIGGERS FROM OUTER SPACE THE MOVIE [imdb.com] and watch it.

Second, you need to succeed in posting a GNAA "first post" on slashdot.org [slashdot.org] , a popular "news for trolls" website

Third, you need to join the official GNAA irc channel #GNAA on EFNet, and apply for membership.
Talk to one of the ops or any of the other members in the channel to sign up today!

If you are having trouble locating #GNAA, the official GAY NIGGER ASSOCIATION OF AMERICA irc channel, you might be on a wrong irc network. The correct network is EFNet, and you can connect to irc.secsup.org or irc.isprime.com as one of the EFNet servers.
If you do not have an IRC client handy, you are free to use the GNAA Java IRC client by clicking here [nero-online.org] .

If you have mod points and would like to support GNAA, please moderate this post up.

This post brought to you by Penisbird [nero-online.org] , a proud member of the GNAA

G_____________________________________naann_______ ________G
N_____________________________nnnaa__nanaaa_______ ________A
A____________________aanana__nannaa_nna_an________ ________Y
A_____________annna_nnnnnan_aan_aa__na__aa________ ________*
G____________nnaana_nnn__nn_aa__nn__na_anaann_MERI CA______N
N___________ana__nn_an___an_aa_anaaannnanaa_______ ________I
A___________aa__ana_nn___nn_nnnnaa___ana__________ ________G
A__________nna__an__na___nn__nnn___SSOCIATION_of__ ________G
G__________ana_naa__an___nnn______________________ ________E
N__________ananan___nn___aan_IGGER________________ ________R
A__________nnna____naa____________________________ ________S
A________nnaa_____anan____________________________ ________*
G________anaannana________________________________ ________A
N________ananaannn_AY_____________________________ ________S
A________ana____nn_________IRC-EFNET-#GNAA________ ________S
A_______nn_____na_________________________________ ________O
*_______aaaan_____________________________________ ________C
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam mollis, libero non facilisis vehicula, quam sem fermentum urna, at porttitor neque odio nec purus. Morbi felis. Mauris arcu turpis, dignissim sed, tristique sit amet, euismod ac, tellus. Pellentesque sit amet nulla. Vestibulum volutpat. Fusce viverra mattis orci. Phasellus sed ante. Vivamus nunc sapien, tristique in, sollicitudin ut, blandit vitae, purus. Cras nonummy facilisis leo. Donec ultricies. Integer eu lacus ac dui consectetuer placerat. Duis nonummy dui id wisi. Nam ullamcorper feugiat eros. Quisque iaculis ligula id elit. Aenean mattis. Proin ut massa vitae ante tempor imperdiet. Donec elit libero, imperdiet ac, pellentesque et, mattis et, diam. Pellentesque venenatis, ipsum vel mollis fermentum, ligula felis elementum ante, sit amet euismod diam pede eu mi. Phasellus tellus est, pharetra ac, placerat ut, vehicula et, quam. Sed tempor posuere lectus. Donec eget libero. Nullam tincidunt mauris et nibh. Phasellus tempus fermentum diam. Morbi at mauris dapibus lacus malesuada molestie. Morbi vehicula, elit quis posuere mattis, arcu tellus ultrices ante, sit amet rhoncus dolor neque eget lacus. Integer in odio. Ut malesuada mi et nibh. Vestibulum wisi justo, vestibulum a, pretium sit amet, euismod a, augue. Aliquam vitae nisl eu metus dignissim eleifend. In hac habitasse platea dictumst. Praesent faucibus tempor tortor. Suspendisse dignissim eleifend dui. Duis adipiscing tellus at nulla. Vivamus mollis, dolor sit amet ornare egestas, risus augue mollis lorem, eget tempus augue augue in libero. Sed tincidunt vestibulum ligula. Vestibulum ut libero eu erat sagittis nonummy. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ut libero. In hac habitasse platea dictumst. Cras convallis urna sed enim. Nullam tortor ante, consectetuer eget, nonummy eu, congue a, metus. Mauris ante. Nulla sed sapien et wisi condimentum feugiat. Curabitur id augue sed nulla accumsan sollicitudin. Nam ornare justo vitae ante. Donec ligula. Donec felis augue, lacinia ut, vestibulum sit amet, ultricies vestibulum, dolor. Nunc nec nisl. Phasellus blandit tempor augue. Donec arcu orci, adipiscing ac, interdum a, tempus nec, enim. Phasellus placerat iaculis orci. Cras sit amet quam. Sed enim quam, porta quis, aliquet quis, hendrerit ut, sem. Etiam felis tellus, suscipit et, consequat quis, pharetra sit amet, nisl. Aenean arcu massa, lacinia in, dictum eu, pulvinar ac, orci. Mauris at diam tempor ante ullamcorper molestie. Ut dapibus eleifend ipsum. Nam dignissim. Donec eContrary to popular belief, Lipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lipsum, "Lorem ipsum dolor sit get libero. Nullam tincidunt mauris et nibh. Phasellus tempus fermentum diam. Morbi at mauris dapibus lacus malesuada molestie. Morbi vehicula, elit quis posuere mattis, arcu tellus ultrices ante, sit amet rhoncus dolor neque eget lacus. Integer in odio. Ut malesuada mi et nibh. Vestibulum wisi justo, vestibulum a, pretium sit amet, euismod a, augue. Aliquam vitae nisl eu metus dignissim eleifend. In hac habitasse platea dictumst. PrDonec eget libero. Nullam tincidunt mauris et nibh. Phasellus tempus fermentum diam. Morbi at mauris dapibus lacus malesuada molestie. Morbi vehicula, elit quis posuere mattis, arcu tellus ultrices ante, sit amet rhoncus dolor neque eget lacus. Integer in odio. Ut malesuada mi et nibh. Vestibulum wisi justo, vestibulum a, pretium sit amet, euismod a, augue. Aliquam vitae nisl eu metus dignissim eleifend. In hac habitasse platea dictumst. Praesent faucibus tempor tortor. Suspendisse dignissim eleifend dui. Duis adipiscing tellus at nulla. Vivamus mollis, dolor sit amet ornare egestas, risus augue mollis lorem, eget tempus augue augue in libero. Sed tincidunt vestibulum ligula. Vestibulum ut libero eu erat sagittis nonummy. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ut libero. In hac habitasse platea dictumst. Cras convallis urna sed enim. Nullam tortor ante, consectetuer eget, nonummy eu, congue a, metus. Mauris ante. Nulla sed sapien et wisi condimentum feugiat. Curabitur id augue sed nulla accumsan sollicitudin. Nam ornare justo vitae ante. Donec ligula. Donec felis augue, lacinia ut, vestibulum sit amet, ultricies vestibulum, dolor. Nunc nec nisl. Phasellus blandit tempor augue. Donec arcu orci, adipiscing ac, interdum a, tempus nec, enim. Phasellus placerat iaculis orci. Cras sit amet quam. Sed enim quam, porta quis, aliquet quis, hendrerit ut, sem. Etiam felis tellus, suscipit et, consequat quis, pharetra sit amet, nisl. Aenean arcu massa, lacinia in, dictum eu, pulvinar ac, orci. Mauris at diam tempor ante ullamcorper molestie. Ut dapibus eleifend ipsum. Nam dignissim. onec eget libero. Nullam tincidunt mauris et nibh. Phasellus tempus fermentum diam. Morbi at mauris dapibus lacus malesuada molestie. Morbi vehicula, elit quis posuere mattis, arcu tellus ultrices ante, sit amet rhoncus dolor neque eget lacus. Integer in odio. Ut malesuada mi et nibh. Vestibulum wisi justo, vestibulum a, pretium sit amet, euismod a, augue. Aliquam vitae nisl eu metus dignissim eleifend. In hac habitasse platea dictumst. Praesent faucibus tempor tortor. Suspendisse dignissim eleifend dui. Duis adipiscing tellus at nulla. Vivamus mollis, dolor sit amet ornare egestas, risus augue mollis lorem, eget tempus augue augue in libero. Sed tincidunt vestibulum ligula. Vestibulum ut libero eu erat sagittis nonummy. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ut libero. In hac habitasse platea dictumst. Cras convallis urna sed enim. Nullam tortor ante, consectetuer eget, nonummy eu, congue a, metus. Mauris ante. Nulla sed sapien et wisi condimentum feugiat. Curabitur id augue sed nulla accumsan sollicitudin. Nam ornare justo vitae ante. Donec ligula. Donec felis augue, lacinia ut, vestibulum sit amet, ultricies vestibulum, dolor. Nunc nec nisl. Phasellus blandit tempor augue. Donec arcu orci, adipiscing ac, interdum a, tempus nec, enim. Phasellus placerat iaculis orci. Cras sit amet quam. Sed enim quam, porta quis, aliquet quis, hendrerit ut, sem. Etiam felis tellus, suscipit et, consequat quis, pharetra sit amet, nisl. Aenean arcu massa, lacinia in, dictum eu, pulvinar ac, orci. Mauris at diam tempor ante ullamcorper molestie. Ut dapibus eleifend ipsum. Nam dignissim.

Andrew Huard posts personal information illegally! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#6617052)

The AAHAA [borahbands.com] is back, bringing you the best in reply-trolling [borahbands.com] . Support the GNAA

Readability.... (5, Funny)

fiftyfly (516990) | more than 10 years ago | (#6616634)

Man I can't read my own perl, I can't imagine buying a book simply for the pleasure of reading someone else's

Re:Readability.... (5, Insightful)

pestilence4hr (652767) | more than 10 years ago | (#6616793)

Actually, I disagree and think just the opposite. In many cases, I find that perl is easier to read because of all the "symbols" at the begining of variables and such.

For instance, in Java "String foo;" and in perl "$foo". Now, later in the code, if I see "$foo" in my perl code, I know immediatly that I'm dealing with a scalar, or %foo is a hash, whereas in most other languages I have to either remember the variable declarations or go back and find the variable declaration in the file.

Also, I think alot the supposed unreadability of perl has to do with regex. Since regex is such a basic part of perl, it gets used alot and when you come across "$_ =~ s/^([^ ]*) *([^ ]*)/$2 $1/;" you may attribute the mess of characters to perl when in fact, most of the mess is regex, which exists in many languages.

This is not to say that I haven't see lots of ugly code, perl or otherwise but I don't think perl is really any more difficult to read than other languages.

Re:Readability.... (4, Insightful)

eln (21727) | more than 10 years ago | (#6616841)

The readability problem with Perl is a cultural one, not a language one. The language itself is very simple to read, with the possible exception of the more complex regular expressions.

The difficulty lies in the fact that it is possible to obfuscate Perl to such a degree, and that so many Perl hackers seem to think more obfuscation makes them look like a better programmer. There's even a contect that rewards this kind of thing.

If you want to write good, maintainable code, you can do it in Perl just as well as any other language. If you want to write an obfuscated mess, the same holds true. Sure, writing obfuscated Perl may make you feel more manly or whatever in the short term, but it won't help you keep your job when you can't read what you've written 6 months later.

Re:Readability.... (2, Insightful)

pileated (53605) | more than 10 years ago | (#6617145)

I think you're right about confusing obfuscation with programming machismo. But I have to say that no regular expression I've ever seen (except perhaps for last page of Mastering Regular Expressions) has been as baffling as something like $foo{$bar}{$foo2}. For me references and dereferencing and dereferencing shortcuts are the least readable elements of perl.

But perl's mindset from what I can tell is power through brevity and flexibility. Going from it to Java is tortuous. So many words to type!!! But they both have their strengths. No doubt you're right that Perl code can be made readable if you make an effort. But I think readability has never been something that the Perl community has seemed to value, at least not as much as it should. So for anyone who's never learned it, it just seems needlessly and maybe purposefully obscure and hard to read. Making readable Perl has just never seemed cool to perl community from what I can see.

I don't say this as a criticism. I really like Perl and always have. But it may take a certain type of mind to love and master its brevity.

Hear Hear! (1)

JohnGrahamCumming (684871) | more than 10 years ago | (#6617417)

I totally agree. There is *nothing* in the language that forces people to write bad code with Perl (and frankly there are plenty of unreadable non-Perl projects out there).

On the POPFile project I've done everything I can to avoid Perl's temptations into obscurity by writing clear code. Amazingly I've been critized by monoric readers of the code that I could have done things with less "space" (i.e. using less screen real estate). People like that know nothing about maintenance of code and should just bug off.

If you come across Perl code that's unreadable don't blame the language, blame the author. People who write obfuscated code in any language are doing a disservice to themselves and others who read the code; if they release the code as open source then it's a _crime_ since they are inviting readers to work on their crud.

John.

Re:Hear Hear! (1)

cK-Gunslinger (443452) | more than 10 years ago | (#6618126)


Amazingly I've been critized by monoric readers of the code...
Hey, you shouldn't discriminate against people with Mono. After all, it's a kissing bug, baby!

Re:Readability.... (4, Funny)

Frymaster (171343) | more than 10 years ago | (#6616883)

hey! there's some perl that's actually quite readable (and even poetic). witness the "black perl" script:

BEFOREHAND: close door, each window & exit; wait until time.
open spell book, study, read ( scan, select, tell us );
write it, print the hex while each watches, reverse its length, write again;
kill spiders, pop them, chop, split, kill them.
unlink arms, shift, wait & listen ( listening, wait ),
sort the flock ( then, warn the "goats" & kill the "sheep" );
kill them, dump qualms, shift moralities, values aside, each one; die sheep ! die to reverse the system you accept ( reject, respect );
next step, kill the next sacrifice, each sacrifice, wait, redo ritual until "all the spirits are pleased";
do it ( "as they say" ).
do it ( *everyone***must***participate***in***forbidden**s *e*x*). return last victim; package body;
exit crypt ( time, times & "half a time" ) & close it, select ( quickly ) & warn your next victim;
AFTERWARDS: tell nobody.
wait, wait until time;
wait until next year, next decade;
sleep, sleep, die yourself,
die at last
and it actually parses.

note: this script is for entertainment purposes only and is not meant as an endoresement of human sacrafise, real or virtual.

Please use Python instead (0)

Anonymous Coward | more than 10 years ago | (#6617104)

Please use Python in the future.

At least it has a clear structure (and don't complain about the indentng issue; use an editor that does the indenting for you) and proper commands.

Perl looks like modem line noise and it expects you to know regular expressions which are just about as intuitive and easy to remember as emacs commands.

Obligatory Soviet Russia joke? (0)

Anonymous Coward | more than 10 years ago | (#6617534)

In Soviet Russia there's more than one way to do you.

fp! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#6616639)

fp!

Re:fp! (0)

Anonymous Coward | more than 10 years ago | (#6617165)

a failure is always a failure

"Review"? (-1, Flamebait)

Anonymous Coward | more than 10 years ago | (#6616646)

This is just about the worst review I ever read. This is not a review, it is a summary and what is worse you gave away the ending (in a PLOT based book!)

This reads like Bart Simpson cribbing Treasure Island from the cover. You didn't talk about characterisation, style, pacing, about comparable novels, you just blabbed out the plot. Were you making sound effects with your mouth while you wrote this?

I give this review a "-1", and - SPOILER ALERT!- it sucks major ass. The only way this could be worse if if (when?) Taco dupes it.

Re:"Review"? (0)

Anonymous Coward | more than 10 years ago | (#6617133)

Trinity dies at the end of Gigli.

Re:"Review"? (1)

larry bagina (561269) | more than 10 years ago | (#6617202)

Thanks a lot asshole! I just wasted an hour and 5 bucks hoping i would get to see Ben Affleck and Jennifer Lopez die brutal deaths!

Next time, post a ninja-link to goatse.cx [goatse.cx] -- at least some guy's bloody asshole is less disgusting that watching b-flack and j-lo trying to act!

Re:"Review"? (0)

Anonymous Coward | more than 10 years ago | (#6617293)

It's turkey time. Gobble, gobble.

It's the alpaca book (2, Funny)

M. Silver (141590) | more than 10 years ago | (#6616651)

... for those of us who can never remember the titles, only the critters.

Re:It's the alpaca book (0)

Anonymous Coward | more than 10 years ago | (#6617015)

Ya great! Now I'll just get it confused with the llama book....

I agree with the reviewer (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#6616664)

While I was reading 'Learning Perl Objects, References & Modules', my toilet got tanked up, with stinky liquid overflowing the basin and ruining my carpeting. My girlfriend left me and a neighbor accidentally shot my dog. My credit card and identity were stolen and the thief procured three mortgages at unusually high rates in Nebraska.

Overall, I give this book 3 stars out of 5.

Oh, yeah, right, sure (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#6616680)

YOU had a girlfriend. *snort*

Yes, I did (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#6616767)

She was pretty, too.

Re:Yes, I did (0)

Anonymous Coward | more than 10 years ago | (#6616879)

She was pretty fat, you mean

No (0)

Anonymous Coward | more than 10 years ago | (#6617053)

Just pretty.

Re:No (0)

Anonymous Coward | more than 10 years ago | (#6617097)

Was this before or after the sex change?

I don't know (0)

Anonymous Coward | more than 10 years ago | (#6617186)

When was you sex change?

Moderator abuse (0)

Anonymous Coward | more than 10 years ago | (#6617199)

my toilet got tanked up, with stinky liquid overflowing the basin and ruining my carpeting. My girlfriend left me and a neighbor accidentally shot my dog. My credit card and identity were stolen and the thief procured three mortgages at unusually high rates in Nebraska.

And just why was this moderated as redundant?

Yes. It's a troll, maybe a flamebait, but redundant?! Fucking moron moderators.

And if you think this will be corrected by the metamoderation, think again. Slashdot moderation is utterily broken.

Re:Moderator abuse (0)

Anonymous Coward | more than 10 years ago | (#6618238)

And just why was this moderated as redundant?

Apparently this problem persists for quite a few people who have bought the book and is now common knowledge. It's like saying "Linux is open-source" or "Cmdr Taco Sux". Everyone knows that so reiterating is futile.

33% cheaper at amazon (0, Informative)

Anonymous Coward | more than 10 years ago | (#6616685)

WARNING GOATSE LINK (-1, Troll)

Anonymous Coward | more than 10 years ago | (#6616724)

do not clicky

DUMBASS LIAR (0)

Anonymous Coward | more than 10 years ago | (#6617932)

why are you jealous of the whore trying to get commissions from people?

38% off at bookpool! (1)

Megaslow (694447) | more than 10 years ago | (#6616918)

List Price: $34.95
Our Price: $21.50
You Save: $13.45 (38% Off)

Bookpool? (0)

Anonymous Coward | more than 10 years ago | (#6617644)

Yeah? And you'd trust your credit card number with a no-name store like bookpool?

I think not.

9.9? (5, Funny)

mopslik (688435) | more than 10 years ago | (#6616686)

Rating: 9.9 - Cannot find a fault

Obviously, the review was calculated using an early Pentium [maa.org] .

Re:9.9? (0)

Anonymous Coward | more than 10 years ago | (#6617136)

Why are these lame jokes becoming popular again?
In capitalist Slashdot, early Pentium calculates YOU!

Re:9.9? (1)

mopslik (688435) | more than 10 years ago | (#6617331)

Why are these lame jokes becoming popular again? In capitalist Slashdot, early Pentium calculates YOU!

(stares blank-faced at equally lame Yakov imitation)
It's like the square root of a million -- some things we'll just never know.

me too (3, Interesting)

514x0r (691137) | more than 10 years ago | (#6616694)

It was with a problem that needed solving and a copy of the camel book that I started as a Perl programmer

how else would one want to learn perl?

well! (1, Funny)

Anonymous Coward | more than 10 years ago | (#6616695)

how about putting a spoiler warning! you practically gave away the ending!

You did the author a huge disservice.

This book - two thumbs down (5, Insightful)

stratjakt (596332) | more than 10 years ago | (#6616702)

I cant disagree with the reviewer more. This book is crammed with anecdotes and stories, and very little actual information.

Which while some may enjoy cute little stories about the time the guy was up all night to meet a deadline, some of us read technical books to learn or enhance technical skills.

This is so far from K&R it's sacrelige to even make the comparison. Shame on you.

Re:This book - two thumbs down (0, Offtopic)

jdbo (35629) | more than 10 years ago | (#6617058)

I haven't read this book, but I'm fascinated by the moderation of the parent comment as "insightful"..."informative", perhaps... after all, it does confirm that the light nature of the writing style will turn off those who prefer dense technical writing... but it does so in a shallow manner that sheds no light on why such a writing style might be a bad thing. If anything, this post represents the opposite of insightful thinking.

Re:This book - two thumbs down (0)

Anonymous Coward | more than 10 years ago | (#6617167)

+4 insightful? Stratjakt is a known troll. Check out his other work.

Re:This book - two thumbs down (1)

gantrep (627089) | more than 10 years ago | (#6617357)

see, I was right [slashdot.org]

You dont have to read the book, or even know what it's about. Look for a post I made in this thread that got +5 Insightful. I've never read this book and I dont use Perl. Just string together a bunch of "kudos" or "boos" and toss in a couple buzzwords (K&R works fine), and there you go.

Re:This book - two thumbs down (1)

stratjakt (596332) | more than 10 years ago | (#6617409)

You're a superhero. You keep track of "known trolls".

Just because I think that you and the rest of your groupthink idiot ilk are laughable and worthy of ridicule, doesn't mean that you need discount everything I say.

You're like a second grader with his hands over his ears screaming "LALALALAL I CANT HEAR YOU".

Go fuck yourself, put me on your foes list, and dont bother reading my posts.

Thank you for your (no doubt worthless) time.

Re:This book - two thumbs down (0)

Anonymous Coward | more than 10 years ago | (#6617654)

He's the second grader?

Ha!

Re:This book - two thumbs down (1)

Eric Ass Raymond (662593) | more than 10 years ago | (#6617440)

And that makes his opinion irrelevant just how? I assume your comment implies that the post above should have been moderated down instead of up. Why? Because of his posting history?

"Stratjakt is a known Communist. Check out his other work."

You are suffering from the Dubyaitis: everything's black and white, good and evil, trolling and "serious" slashdot use. The world doesn't work like that, my friend. The world is not black and white. The world is shades of gray.

Re:This book - two thumbs down (0)

Anonymous Coward | more than 10 years ago | (#6618172)

He either read the book and is being truthful, or didn't read it and is full of shit. I fail to see how this is anything but black or white.

Re:This book - two thumbs down (1)

pongo000 (97357) | more than 10 years ago | (#6618076)

And while we're at it, let's make perfectly clear that Learning Perl is simply an abridged version of Programming Perl.

Mr. Schwartz does seem to know how to milk those cash camels, though!

What C programmers hold the K&R book in revere (4, Interesting)

squarooticus (5092) | more than 10 years ago | (#6616703)

That book is essentially worthless except for looking up random facts after you've been programming C for a few months. In contrast, the camel book is useful even for long-time Perl hackers, because Perl has more built into the language (e.g., regexps, hashes, etc.) than C, the latter of which is incredibly simple by comparison.

[Aside: The book I use most often is Stroustrup's C++ Second Edition, which in itself is rather vague and outdated wrt the details I need to know most often these days. I'm thinking of getting myself a copy of one of the C++ specs to help me answer the really obscure questions. Does someone recommend a particular spec (e.g., ANSI, ISO)?]

Re:What C programmers hold the K&R book in rev (0)

Anonymous Coward | more than 10 years ago | (#6616782)

Dietel and Dietel is good.
C++ How to Program.

Re:What C programmers hold the K&R book in rev (1, Funny)

Anonymous Coward | more than 10 years ago | (#6616839)

Don't buy it. It's a cheap Chinese knock-off of Deitel and Deitel [deitel.com] , whom I wholeheartedly recommend.

Re:What C programmers hold the K&R book in rev (0)

Anonymous Coward | more than 10 years ago | (#6617618)

Are you insane? That book is utter crap.

Re:What C programmers hold the K&R book in rev (4, Insightful)

murdocj (543661) | more than 10 years ago | (#6616875)

That book is essentially worthless except for looking up random facts after you've been programming C for a few months.

I couldn't disagree more. I learned C from the original K&R book. It was well organized, clear, and consise. The Camel book, on the other hand, often seemed like concepts on page n relied on concepts introduced on page n+1. I found that no matter how much I programmed in Perl (about a year's worth of time) and no matter how much I used the Camel book, I could never find what I was looking for without a massive search.

Re:What C programmers hold the K&R book in rev (1)

Angst Badger (8636) | more than 10 years ago | (#6617426)

This is why I laughed at the original post -- if the Camel book is a "short, sharp introduction," I'd hate to see the reviewer's idea of a sprawling book.

To be fair, a sprawling language like Perl needs a sprawling reference, and the Camel book does a decent job of it.

Personally, I don't often refer to K&R, but that's because C is a simple language that you can learn in its entirety without too much effort. Who truly knows all of Perl? Or C++ or COBOL, to mention two other giant languages? A small percentage of the users of all three. Which is not a criticism of Perl per se -- I use C and Perl and enjoy both -- but comparing C with Perl is like comparing apples and, uhm, county-fair-prize-winning giant pumpkins.

Re:What C programmers hold the K&R book in rev (4, Funny)

ggruschow (78300) | more than 10 years ago | (#6616876)

I'm thinking of getting myself a copy of one of the C++ specs to help me answer the really obscure questions. Does someone recommend a particular spec (e.g., ANSI, ISO)?

Actually, this [sun.com] pretty much solved all my obscure or arcane C++ questions. In fact, while referring to that I haven't once had trouble figuring out if I was implicitly causing a conversion which caused a deep copy which in turn caused a memory leak since.

Of course, "Why did my program just pause for a 1/10th of a second, and how can I avoid that?" comes up more often now.

LOL (1)

squarooticus (5092) | more than 10 years ago | (#6616928)

It took me a second to get the joke, but your point is well taken. I have taken great pains to implement garbage collection in C++, but significant understanding of the language is still required to avoid certain pessimal behaviors, which is especially problematic when others use my garbage collector. :)

OT post (0)

Anonymous Coward | more than 10 years ago | (#6617010)

BTW, I should point out that my garbage collector is better behaved than Java's: I don't have to refer to any documentation to know when the memory is going to be cleaned up, and I don't have huge 1/10-second delays caused by such events, because the behavior of the garbage collector is well-defined, even across compilers, since it's done at language-level, not at bytecode/machine code level.

Also, I can't believe Java still doesn't have templates. For shame. :( That is enough to keep me away from it unless I absolutely have to use it.

squarooticus

Re:What C programmers hold the K&R book in rev (0)

Anonymous Coward | more than 10 years ago | (#6617544)

K&R's book is entirely appropriate, when used for its intended purpose. I came to C from Perl and found K&R's book ideal. It was, after all, designed to be an introduction to C for someone who was already a quite competent programmer. I'll agree that, apart from an occasional reference, its usefulness drops quickly; after the first read-through it is largely useless. However, and importantly, I tried three other books on C first, and only K&R's was helpful. Most of the rest were either obsessed with teaching advanced C techniques, or introducing programming concepts with which I have long been familiar. The book is effective in what it does.

Recommend Perl: The Complete Reference (1)

neptune1 (301990) | more than 10 years ago | (#6616704)

Perl: The Complete Reference is a very good and easy to read and understand perl book. Its somewhat old but still a great book.

Re:Recommend Perl: The Complete Reference (1)

dlosey (688472) | more than 10 years ago | (#6616810)

I agree!

Once you've read the camel book, you are truly "over the hump", and can really start to program in Perl.

Re:Recommend Perl: The Complete Reference (0)

Anonymous Coward | more than 10 years ago | (#6617304)

slashdot really needs a score -1 punny moderation.

Try perldocs (4, Insightful)

Ars-Fartsica (166957) | more than 10 years ago | (#6616732)

So much of this stuff is in the perldocs. I applaud O'Reilly for supporting open source but outside of the Camel book and the Perl Cookbook, I think the rest of the books are mostly redundant.

At some point you have to put the books down and start programming if you truly want to master the language. After the Camel book is probably a good time to start, with references to the Cookbook when needed. For other info, the perldocs are recommended.

Re:Try perldocs (3, Insightful)

eln (21727) | more than 10 years ago | (#6616798)

The camel book is pretty much entirely in perldocs as well. In fact, most of it is verbatim.

Having said that, the Camel book is probably the single most useful programming book I have ever read. I bought my copy 6 or so years ago (right after the 2nd edition came out) and I still use it to this day. It is unusual in that it not only allows one to pick up the language quickly and easily, but is concise enough to be used as a quick reference that is often more handy than the perldocs.

It may be that I had already been programming Perl for too long before the other books came out, but I was never able to find anything really useful at all from them.

Re:Try perldocs (1)

althalus (520424) | more than 10 years ago | (#6617809)

I can't say I fully agree with that. While the book may seem redundant for the experienced perl programmer, I just finished it and would definately say it fits it's target market. I know a bunch of developers who started with the llama, went to the camel, but lost out on the good info that this puts inbetween. Some kinda Oreo Cream filling between the llama and camel.

I would definately recommend this book to the developers who are at that stage of their development. It's a useful tutorial style book for those who are learning. It doesn't pretend to be a reference, or do things it shouldn't. It does it's job, and does it well.

I'm just mad that this was posted, since I was going to submit my review this week.

Damien Conway's "Object Oriented Perl" ? (5, Interesting)

bongoras (632709) | more than 10 years ago | (#6616741)

Has anyone read both this book and Damien Conway's book? I'd be interested in a comparison. I like the Conway book, but it's a little dense for me. Or I'm too dense for it... either way...

Re:Damien Conway's "Object Oriented Perl" ? (2, Informative)

pileated (53605) | more than 10 years ago | (#6616988)

How bout "has anyone started both books?" Based on that comparison I'd say I've gotten farther in this book than I ever did in Damian Conway's book (which I had really high expectations for based on reviews). In fact I think I started the Conway book more than once but never got more than 1/4 of the way through it. I'm halfway through this one now and have no doubts that I'll complete it.

Of course then I might go back and reread the Conway just to see if it makes more sense.

So for me I prefer this one. But that's just me. I liked the Conway book but it just got too dense too quick.

Re:Damien Conway's "Object Oriented Perl" ? (2, Informative)

afabbro (33948) | more than 10 years ago | (#6617045)

I've read it cover to cover and use it frequently. Definitely the best perl book I've read (with the list of "perl books I've read" consisting of most of the O'Reilly line). Conway covers OOP theory, how to apply it in perl, neat perl-only tricks, and a lot of fun stuff. His examples are hilarious and his writing among the best traditions of technical instruction. Even OOP aside, I learned more about perl from Damian's book than anything else I've read. Highly recommended.

Re:Damien Conway's "Object Oriented Perl" ? (2, Interesting)

bunco (1432) | more than 10 years ago | (#6618068)

Conway's book is the best I've read on the subject of perl OOP. If you take the time to make sure you *understand* each and every concept and mechanism, the book will leave you with a firm understanding of objects. This shouldn't be a problem as the book is a delightful read. A firm understanding of the perl language, references, globs, packages, etc would be an important requisite as the book is not for the novice.

Rating (2, Interesting)

Karamchand (607798) | more than 10 years ago | (#6616754)

Rating: 9.9 - Cannot find a fault. Uhm. Now please tell me - why not 10 then?

Re:Rating (1)

vasqzr (619165) | more than 10 years ago | (#6617434)

The next edition will be a 10. Or a 9.5

Sounds like my employee review.

"I'm only giving you an 85%. This way, I can give you an 88% next year, and since you're 'improving' you get a raise."

If at first you give something 100%, any other than 100% is BAD.

Re:Rating (1)

UserGoogol (623581) | more than 10 years ago | (#6618231)

Some people feel awkward rating anything 10 ever because (if taken incredibly literally) it means that there is no book which can ever be better than this book.

books (3, Interesting)

erikdotla (609033) | more than 10 years ago | (#6616783)

Some people need books, others don't. Personally I find the ActivePerl documentation to be excellent.

The idea that you can do a PPM search for a module via CPAN based on your need, download it, and have it's docs integrated into the centralized documentation is great. perlfunc, perlre, perlobj, etc are a bit arcane but with a little elbow grease and a good editor (SlickEdit!), you figure things out pretty quick.

Re:books (1)

erikdotla (609033) | more than 10 years ago | (#6617791)

Cmon, this wasn't interesting. Maybe a 1. I demand that my points be revoked immediately.

Re:books (1)

pileated (53605) | more than 10 years ago | (#6617934)

I'd be happy to knock it down to a 2 or so.:-)

BUTTTTTTTTTTTTTTTTTTTTTTTTTT, just before I read your post demanding that it be knocked down I was thinking that someone should start a new subject on "Learning programming through books - pros and cons" or some such thing. I keep noticing these statements from people who claim that they don't need to read books, and seem to be proud of it. Personally I think that's nuts. But there certainly do seem to be a number of people of that persuasion. Much of it seems like some sort of youthful bravado but I wonder if there's also some truth to it.
I guess I'm wondering if there is a change and that there is a growing number of accomplished programmers who really don't read books. I'm happy not to be one of them but I still find it an interesting question. So, for prompting this totally unrelated post, I unofficially demote your first post to 2.0.

Perl is teh sux0r (-1, Troll)

Anonymous Coward | more than 10 years ago | (#6616791)

PHP is teh l337 h8x0r

Perl died in the 90's when PHP was introduced... if you code perl, then get w/it and code PHP instead lu53r

roflmao

Re:Perl is teh sux0r (1, Insightful)

Anonymous Coward | more than 10 years ago | (#6616853)

Perl died in the 90's when PHP was introduced... if you code perl, then get w/it and code PHP

Why would they move to a less capable language?
(and I'm not even a Perl guy)

Re:Perl is teh sux0r (1, Funny)

gantrep (627089) | more than 10 years ago | (#6617252)

Because it has lots of k3wl functions. Wow, system, passthru, shell_exec and bactics? So many choices of how I can execute my perl scripts!!

Perl without the Camels? (2, Insightful)

RevMike (632002) | more than 10 years ago | (#6616797)

One has to wonder if Perl would be nearly as popular if not for the excellent O'Reilly books to go with it.

My advice (1, Funny)

Anonymous Coward | more than 10 years ago | (#6616804)

Wait for the movie.

I heard O'Reilly got Tom Cruise to be in it.

I have it too (5, Informative)

JanneM (7445) | more than 10 years ago | (#6616807)

I recently bought this, and for much the same reasons as the reviewer.

Basically, if your introduction to Perl was via "Learning Perl" then this is probably a great next step. I went through the Camel book and the Perl cookbook instead, and find that this one does not give all that much more information as I would have liked. This is not strange; the authors explicitly say in the preface that this is the companion book to "Learning Perl".

On the upside, it does give a good deal of useful snippets of info, and it manages to give clear explanations for some stuff that is otherwise quite opaque; the way it explains the Perl object model, for example is much clearer to me than the treatment given in the Camel book.

I would have given it 7.5-8 rather than the extreme score the reviewer gave.

If you wan to do OO-Perl, I recommend... (-1, Offtopic)

Colonel Panic (15235) | more than 10 years ago | (#6616809)

Programming Ruby: The Pragmatic Programmer's Guide by Dave Thomas and Andy Hunt (the authors of The Pragmatic Programmer).
It just feels a whole lot better than doing OO-Perl.

Some heavy-handed modding here? (0)

Anonymous Coward | more than 10 years ago | (#6618024)

Jeez... all he did was point out another book, OK it's about Ruby not Perl, however, the common theme is object orientation. Isn't it true that a lot of Perl-folk could gain by taking a look into Ruby if they're interested in OO programming?

In a nutshell (0, Flamebait)

Troll_Kamikaze (646926) | more than 10 years ago | (#6616856)

The book starts with a chapter on building larger programs that covers @INC, eval, do and require before discussing packages and scope. It then has several chapters on references that explains in well understandable fashion and increasing complexity all the ins and outs of references including dereferencing, nested references, references to subroutines and references to anonymous data before a final chapter on references that gives you some incredibly useful tricks such as sorting and recursively defining complex data.

In other words, Perl needs a book devoted to topics that are totally straightforward in a well-designed language [python.org] .

Half way through (5, Insightful)

pileated (53605) | more than 10 years ago | (#6616904)

and it's slow going, but I've sure learned a lot. Now maybe I'm dense but I don't think that references, anonymous hashes, references, subroutines are all that easily understood. In fact you can accomplish a whole hell of a lot in Perl without understanding them. But for anyone wanting to make the jump to larger more complex programs you really need to understand them. I'm just finishing the references section (first half) and still have the objects section ahead of me. I've read the tutorial on objects before and at first glance this book looks similar to it. But I didn't get as far in the tutorial as I would have liked, I think because I didn't understand references as well as I should. With the solid foundation that this book gives I think that I'll get a whole lot more out of the objects section, even if it more or less duplicates the tutorial (which I doubt).

So, half way through, I give it two thumbs up. My Perl programming has just gotten a lot more sophisticated. Maybe I was dense to begin with but any step up is something I'm happy about.

As far as those nutty complaints about O'Reilly lingering at the bottom of this thread all I can say is that they've found their proper place.

Re:Half way through (1)

kisrael (134664) | more than 10 years ago | (#6616975)

Perl 5's OO model is really, really painful.

I wouldn't recommend it to anybody. The way it makes you put different objects in different files/modules is so counter to Perl's scripting heritage that a good procedural/reusability-based outlook will get a lot more traction than this OO mess, at least 'til Perl 6.

Re:Half way through (2, Informative)

jslag (21657) | more than 10 years ago | (#6617879)

The way it makes you put different objects in different files/modules is so counter to Perl's scripting heritage

Different classes can be defined in the same file, no problem - just make a package declaration to begin each new one.

Having said that, I've never wanted to actually have more than one class in a file. Sure, OO is counter to 'Perl's scripting heritage', but so what? There's a reason that much of the good stuff on CPAN is written in an OO style.

honestpuck is a review machine (1)

billstr78 (535271) | more than 10 years ago | (#6616994)

How does honestpuck have teh time to review so many terse technical books? I wonder if these reviews are as well thought out as they could be if honestpuck was not trying to crank out 3 a week. I am going to propose the conspiracty theory that honestpuck is really an alias for a group of 10 Slash developers!

Re:honestpuck is a review machine (1)

stratjakt (596332) | more than 10 years ago | (#6617124)

You dont have to read the book, or even know what it's about. Look for a post I made in this thread that got +5 Insightful. I've never read this book and I dont use Perl. Just string together a bunch of "kudos" or "boos" and toss in a couple buzzwords (K&R works fine), and there you go.

Re:honestpuck is a review machine (0)

Anonymous Coward | more than 10 years ago | (#6617490)

I've had cut/paste reviews from amazon.com get moderated +5 a couple dozen times.

Once I had a review posted that was just a rewrite of some amazon.com reviews, with some vauge comments on faults based on a quick thumbing at the local borders.

Slashdot book reviews don't exist to review or criticize books, they exist for the referer money.

Randal Schwartz (the writer) (5, Informative)

Bluetrust25 (647829) | more than 10 years ago | (#6617226)

Randal Schwartz is a regular over at PerlMonks.org. He's replied to a couple of my threads and helped me out of some sticky situations. It's rare for such a talented programmer to be so accessible and helpful to the public.

He's written well over 3,000 posts on Perl [perlmonks.org] over at PerlMonks.org [perlmonks.org] .

OOP in Perl is a Bad Thing (1, Interesting)

Le Marteau (206396) | more than 10 years ago | (#6617957)

... because very few perl scripters know how to do it... write an OOP script in Perl, and only an expert will be able to maintain your work.

This is so common in Perl (and other languages). Especially with contractors, for some reason. They come in, write expert level code, using all the secret codes and handshakes, then the average schmucks in the cube farms cannot maintain the code.

Re:OOP in Perl is a Bad Thing (4, Informative)

Christianfreak (100697) | more than 10 years ago | (#6618139)

Wouldn't that be the fault of the people who didn't bother to learn basic concepts like OO programming rather than the fault of the people who know how to use it?

OO in Perl is not hard, sure its syntax is a bit different but the concepts are the same and there are multiple books (like this one), online resources such as this [perlmonks.org] , and not to mention the existance of 4 (not 1 or 2 but 4) tutorials on OO in perl that come with the documentation. If people don't expect their "schmucks in the cube farm" to be skilled in a language then its no wonder that our jobs are going to India!

oh good (-1, Troll)

Anonymous Coward | more than 10 years ago | (#6617976)

so we take a perl n00b and listen to their review.
bah fucking humbug

choke on your honest vomit, puck
Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account

Loading...