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-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

Re: ARGH!

2009-02-20 Thread Aristotle Pagaltzis
* Jonathan Rockway j...@jrock.us [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

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 j...@jrock.us [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

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

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

2009-02-19 Thread Ovid
- Original Message From: Aldo Calpini d...@perl.it 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

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 that

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!

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

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

2009-02-18 Thread Roger Hall
: 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 raha...@ualr.edu wrote: RTFM is always pretty good advice, eh? :} -Original Message- From: Roger Hall [mailto:raha...@ualr.edu] Sent: Wednesday, February 18

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

2009-02-18 Thread Roger Hall
, column Y. Accessing an objects 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 To: raha...@ualr.edu Subject: Re

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

2009-02-18 Thread Jonas Brømsø Nielsen
: 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 raha...@ualr.edu wrote: RTFM is always pretty good advice, eh? :} -Original Message- From: Roger

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

2009-02-18 Thread Roger Hall
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: 'Bill Ward'; module-authors@perl.org Subject: Re: ARGH! (was FW

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
?) 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 just left

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

2009-02-18 Thread Bill Ward
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 To: raha...@ualr.edu Subject: Re: ARGH! (was FW: Perl Critic and (honest) hash references) What

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 jona...@gmail.comwrote: 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

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

2009-02-18 Thread Ovid
From: Bill Ward b...@wards.net 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

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

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 e...@ezrakilty.net 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

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 e...@ezrakilty.net wrote: On Feb 18, 2009, at 9:08 PM, Bill Ward wrote: Still, that's bogus for ordinary hashes... it should only care about

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