Re: ARGH!

2009-02-19 Thread Jonathan Rockway
* On Thu, Feb 19 2009, Ovid wrote: > Java programmers learned long ago not to let people touch their > privates, Perl programmers should learn the same thing. This is one of Java's worst design decisions. A while back, I needed to customize the way URLConnection worked. The parts I needed to tou

RE: ARGH! (was FW: Perl Critic and (honest) hash references)

2009-02-19 Thread Roger Hall
That is primarily due to their special ability to slay powerful beasties. :} Roger -Original Message- From: Aristotle Pagaltzis [mailto:pagalt...@gmx.de] Sent: Thursday, February 19, 2009 10:13 AM To: module-authors@perl.org Subject: Re: ARGH! (was FW: Perl Critic and (honest) hash refer

Re: ARGH! (was FW: Perl Critic and (honest) hash references)

2009-02-19 Thread Aristotle Pagaltzis
* David Cantrell [2009-02-19 16:45]: > An awful lot of PBP is Just Plain Wrong if you treat it as > hard-and- fast rules that should be obeyed all the time. Case in point, the chapter on references is both extremely anemic and utterly wrong. (Sorry Damian.) > Thankfully, the book makes it clear

Re: ARGH! (was FW: Perl Critic and (honest) hash references)

2009-02-19 Thread David Cantrell
On Thu, Feb 19, 2009 at 09:04:35AM +0100, Aldo Calpini wrote: > IMHO, the unconditional "sponsoring" of Readonly by PBP is just plain wrong. An awful lot of PBP is Just Plain Wrong if you treat it as hard-and- fast rules that should be obeyed all the time. Thankfully, the book makes it clear tha

Re: Perl Critic and 5.6 vs. 5.8

2009-02-19 Thread David Cantrell
On Wed, Feb 18, 2009 at 08:25:39PM -0600, Roger Hall wrote: > 1. I should have perl set to a minimum version, shouldn't I? What's the best > way to do that? (Makefile?) Yes, see http://wiki.cpantesters.org/wiki/CPANAuthorNotes -- David Cantrell | Cake Smuggler Extraordinaire Irregular Englis

Re: Perl Critic and (honest) hash references

2009-02-19 Thread David Cantrell
On Wed, Feb 18, 2009 at 12:58:46PM -0800, Ovid wrote: > 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) Tie::Hash::Vivify is useful for detecting this:

Re: ARGH! (was FW: Perl Critic and (honest) hash references)

2009-02-19 Thread Ovid
- Original Message > From: Aldo Calpini > > Ovid wrote: > > Readonly constants are just easier to use and have fewer "gotchas". > > they have indeed, when you need to access the constants from outside of the > module they are declared in (which is a pretty common case). It also used t

Re: ARGH! (was FW: Perl Critic and (honest) hash references)

2009-02-19 Thread Aldo Calpini
Ovid wrote: Readonly constants are just easier to use and have fewer "gotchas". they have indeed, when you need to access the constants from outside of the module they are declared in (which is a pretty common case). cfr. Foo::Bar::CONSTANT_FIELD vs. $Foo::Bar::CONSTANT_FEILD. the latter fo

Re: Perl Critic and 5.6 vs. 5.8

2009-02-19 Thread Dana Hudes
That is not a valid approach. It may shut up P:::C but there are features like "our" in later versions which one can in best practices use. Do determine your minimum level and put that in. If P::C complains b/c you put use 5.8 in then it is borked --Original Message-- From: Elliot Shank