Re: ARGH!

2009-02-21 Thread Chris Dolan
On Feb 21, 2009, at 2:10 AM, Eric Wilhelm wrote: Is there a critic metric for that? There are several designed to protect internals. Here are the ones among the Perl::Critic core policies: Subroutines::ProtectPrivateSubs ValuesAndExpressions::ProhibitLongChainsOfMethodCalls Variable

Re: ARGH!

2009-02-21 Thread Eric Wilhelm
# from Jonathan Rockway # on Thursday 19 February 2009 11:20: >* On Thu, Feb 19 2009, Ovid wrote: >>The module in question should provide a sub or method to provide >>access to this data. This is a good point. >> Java programmers learned long ago not to let people touch their >> privates, Perl

Re: ARGH!

2009-02-20 Thread Aristotle Pagaltzis
* Jonathan Rockway [2009-02-20 21:15]: > "A great bonus"? Easy things should be easy. Typing out a fully qualified package name is difficult? Huh. > You shouldn't need "syntactic salt" to prevent yourself from > writing bad code. You should avoid writing bad code because > it's bad. Have you h

Re: ARGH!

2009-02-20 Thread Jonathan Rockway
* On Fri, Feb 20 2009, Aristotle Pagaltzis wrote: > A great bonus is that while messing around in an object’s internals > outside your own package is easy to do, there’s some pretty repulsive > syntactic salt associated with it – as it should be. "A great bonus"? Easy things should be easy. You

Re: ARGH!

2009-02-20 Thread Aristotle Pagaltzis
* Jonathan Rockway [2009-02-19 20:20]: > In general, whenever Java does something, you actually want the > opposite. The Perl way is no better. What you really want is to make sure that people can get at innards if they are deliberately trying to, but will stay off each others’ toes as long as t

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

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: 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: ARGH! (was FW: Perl Critic and (honest) hash references)

2009-02-18 Thread Elliot Shank
This was caused by the tester having Perl::Critic::Nits installed, which is not part of core Perl::Critic. Perl::Critic tests should NOT be enabled by default for any CPAN distribution. Do with your P::C test whatever you do with the rest of your author tests to prevent them running by defaul

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

2009-02-18 Thread Bill Ward
On Wed, Feb 18, 2009 at 3:35 PM, Curtis Jewell < perl.module-auth...@csjewell.fastmail.us> wrote: > > On Wed, 18 Feb 2009 22:03 +, "Ezra Cooper" > wrote: > > On Feb 18, 2009, at 9:08 PM, Bill Ward wrote: > > > > > Still, that's bogus for ordinary hashes... it should only care > > > about that

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

2009-02-18 Thread Curtis Jewell
On Wed, 18 Feb 2009 22:03 +, "Ezra Cooper" wrote: > On Feb 18, 2009, at 9:08 PM, Bill Ward wrote: > > > Still, that's bogus for ordinary hashes... it should only care > > about that for objects. Though I wonder how it could possibly know > > the difference. Only by executing the progra

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

2009-02-18 Thread Ezra Cooper
On Feb 18, 2009, at 9:08 PM, Bill Ward wrote: Still, that's bogus for ordinary hashes... it should only care about that for objects. Though I wonder how it could possibly know the difference. Can we define an object as a blessed hash reference? And leave unblessed hashes available as lit

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

2009-02-18 Thread Bill Ward
On Wed, Feb 18, 2009 at 1:15 PM, Ovid wrote: > > From: Bill Ward > > > This gives you quite friendly policy identifiers > > > > [ValuesAndExpressions::ProhibitConstantPragma] Pragma "constant" > used at line 22, column 1. (Severity: 4) > > > > What's wrong with 'use constant'? > > Well, not

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

2009-02-18 Thread Jonas Brømsø Nielsen
Hi William, Damian does not like constants, but I do - so we always disable this policy in our perlcriticrc - it was just an example :) jonasbn On 18/02/2009, at 22.10, Bill Ward wrote: On Wed, Feb 18, 2009 at 12:22 PM, Jonas Brømsø Nielsen > wrote: Hi Roger, How do you perform your perlc

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

2009-02-18 Thread Ovid
> From: Bill Ward > This gives you quite friendly policy identifiers > > [ValuesAndExpressions::ProhibitConstantPragma] Pragma "constant" used > at line 22, column 1. (Severity: 4) > > What's wrong with 'use constant'? Well, nothing's "wrong" with it. It does, however, get clumsy in some

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

2009-02-18 Thread Bruce Gray
On Feb 18, 2009, at 2:32 PM, Roger Hall wrote: Jonas, Honestly I just left the default perlcritic test script in my package as generated by Module::Starter. This was the first time I had done so, and I really had no idea about Perl::Critic until last night when my module failed "smoke" t

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

2009-02-18 Thread Bill Ward
On Wed, Feb 18, 2009 at 12:22 PM, Jonas Brømsø Nielsen wrote: > Hi Roger, > > How do you perform your perlcritic runs? > > I can recommend the verbosity setting 8 > >perlcritic --verbose 8 > > This gives you quite friendly policy identifiers > >[ValuesAndExpressions::ProhibitConsta

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

2009-02-18 Thread Bill Ward
bjects data directly breaks encapsulation and should be > avoided." > > ... is prominently displayed in the module. > > Thanks! > > Roger > > -Original Message- > From: Bill Ward [mailto:b...@wards.net] > Sent: Wednesday, February 18, 2009 11:11 AM

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

2009-02-18 Thread Roger Hall
?) Roger -Original Message- From: Chris Dolan [mailto:ch...@chrisdolan.net] Sent: Wednesday, February 18, 2009 2:44 PM To: raha...@ualr.edu Cc: 'Jonas Brømsø Nielsen'; module-authors@perl.org Subject: RE: ARGH! (was FW: Perl Critic and (honest) hash references) > Honestly I

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

2009-02-18 Thread Chris Dolan
> Honestly I just left the default perlcritic test script in my package as > generated by Module::Starter. This was the first time I had done so, and I > really had no idea about Perl::Critic until last night when my module > failed > "smoke" testing after upload to CPAN. From the test script I am

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

2009-02-18 Thread Roger Hall
ing": t/14_charsetsok 1/11Out of memory! It is from: ADAMK/PPI-1.203.tar.gz Thanks for the suggestion! Roger -Original Message- From: Jonas Brømsø Nielsen [mailto:jona...@gmail.com] Sent: Wednesday, February 18, 2009 2:23 PM To: raha...@ualr.edu Cc: '

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

2009-02-18 Thread Jonas Brømsø Nielsen
l Ward [mailto:b...@wards.net] Sent: Wednesday, February 18, 2009 11:11 AM To: raha...@ualr.edu Subject: Re: ARGH! (was FW: Perl Critic and (honest) hash references) What was the solution? On Wed, Feb 18, 2009 at 8:53 AM, Roger Hall wrote: RTFM is always pretty good advice, eh? :} -Ori

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

2009-02-18 Thread Roger Hall
a...@ualr.edu Subject: Re: ARGH! (was FW: Perl Critic and (honest) hash references) What was the solution? On Wed, Feb 18, 2009 at 8:53 AM, Roger Hall wrote: > RTFM is always pretty good advice, eh? :} > > -Original Message- > From: Roger Hall [mailto:raha...@ualr.edu] > Sen

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

2009-02-18 Thread Roger Hall
11:11 AM To: raha...@ualr.edu Subject: Re: ARGH! (was FW: Perl Critic and (honest) hash references) What was the solution? On Wed, Feb 18, 2009 at 8:53 AM, Roger Hall wrote: > RTFM is always pretty good advice, eh? :} > > -Original Message- > From: Roger Hall [mailto:raha...@ualr

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

2009-02-18 Thread Roger Hall
Well foo. I see it now. RTFM is always pretty good advice, eh? :} Roger -Original Message- From: Roger Hall [mailto:raha...@ualr.edu] Sent: Wednesday, February 18, 2009 10:05 AM To: module-authors@perl.org Subject: Perl Critic and (honest) hash references All, I'm a fa

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

2009-02-18 Thread Roger Hall
Well foo. I see it now. RTFM is always pretty good advice, eh? :} Roger -Original Message- From: Roger Hall [mailto:raha...@ualr.edu] Sent: Wednesday, February 18, 2009 10:05 AM To: module-authors@perl.org Subject: Perl Critic and (honest) hash references All, I'm a fa