The spelling issue in hash is resolved with the "use fields" pragma. That requires you predeclare (horrors!) your hash keys. ------Original Message------ From: Ovid To: raha...@ualr.edu To: Shlomi Fish To: module-authors@perl.org Sent: Feb 18, 2009 3:58 PM Subject: Re: Perl Critic and (honest) hash references
----- Original Message ---- > From: Roger Hall <raha...@ualr.edu> > Personally though, I wouldn't create an object unless there were methods > (which there are not in this case). Without methods, an "object" just seems > like a too-fat hash to me! :} Mostly agreed. Objects should be about responsibilities (behavior) and not so much about state (data). That being said, hashes are notorious for $gimme->{feild} (note the misspelling) or $current->{ip_address} = "apples" (wrong kind of data) and objects can help there, but that's using objects to overcome Perl's type limitations. Seems a bit heavyweight at times, really. Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog - http://use.perl.org/~Ovid/journal/ Twitter - http://twitter.com/OvidPerl Official Perl 6 Wiki - http://www.perlfoundation.org/perl6 Sent from my BlackBerry® smartphone with Nextel Direct Connect