Re: Name for barcode-reading module?

2009-02-18 Thread David Cantrell
On Tue, Feb 17, 2009 at 01:04:55PM -0500, Keith Ivey wrote: Okay, it seems like Barcode is the best namespace for it. As Bill says, the module is essentially OCR for barcodes ... Right now, I'm leaning toward Barcode::Finder, or maybe Barcode::Recognizer. Anyone have any better ideas?

Perl Critic and (honest) hash references

2009-02-18 Thread Roger Hall
All, I'm a fan of Class::Std and Dr. Conway's efforts, but I'm bemused by a failing perlcritic test on a new module. I used a hash reference to hold several values to make it easier to dump with YAML, so my code is peppered with code like this: $config-{query} Perlcritic complains that

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

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

Re: Perl Critic and (honest) hash references

2009-02-18 Thread Shlomi Fish
On Wednesday 18 February 2009 18:05:13 Roger Hall wrote: All, I'm a fan of Class::Std and Dr. Conway's efforts, but I'm bemused by a failing perlcritic test on a new module. I used a hash reference to hold several values to make it easier to dump with YAML, so my code is peppered with code

RE: Perl Critic and (honest) hash references

2009-02-18 Thread Roger Hall
Thanks Shlomi! That is the case. 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! :} Thanks again! Roger -Original Message- From: Shlomi Fish

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

2009-02-18 Thread Roger Hall
Bill, We can exclude specific policies in the code with specially formatted comments. The M in this (RTFM) case is here: http://search.cpan.org/~elliotjs/Perl-Critic-1.096/lib/Perl/Critic.pm#BENDIN G_THE_RULES The specific policies aren't properly linked, but Google knows all:

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

2009-02-18 Thread Roger Hall
I had to dig around in the policy modules because it isn't actually listed in the other document I linked. Specifically: ProhibitAccessOfPrivateData I'm only sure this is it because the error message that came out of the report ... Private Member Data shouldn't be accessed directly at line X,

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

2009-02-18 Thread Jonas Brømsø Nielsen
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::ProhibitConstantPragma] Pragma constant used at line 22, column 1. (Severity: 4) well my

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

2009-02-18 Thread Roger Hall
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 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 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
Or at least figuring out how to turn it off! ;} (Actually, I also had a bare file handle and two-arg file open; *that* I changed. So I am proud for the help!) BTW - could you change the smoke settings for perlcritic to verbose as Jonas described? (Or do I misunderstand how the smoke system

Re: Perl Critic and (honest) hash references

2009-02-18 Thread Ovid
- 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

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

2009-02-18 Thread Bill Ward
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. On Wed, Feb 18, 2009 at 12:17 PM, Roger Hall raha...@ualr.edu wrote: I had to dig around in the policy modules because it isn't actually listed in

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

2009-02-18 Thread Dana Hudes
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)

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

Perl Critic and 5.6 vs. 5.8

2009-02-18 Thread Roger Hall
All, OK this probably is in the code (if not the manual), but I've a new error from P::C. Three-argument form of open used at line 351, column 4. Three-argument open is not available until perl 5.6. I really need to sharpen my CPAN skills, and really I appreciate all the kind

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

Re: Perl Critic and 5.6 vs. 5.8

2009-02-18 Thread Elliot Shank
Roger Hall wrote: Three-argument form of open used at line 351, column 4. Three-argument open is not available until perl 5.6. [chop] 2. Does the applicable P::C::Policy take the prereq’d version into account? Put a use 5.005 or other version less than 5.006 at the top of your module and

Re: Perl Critic and (honest) hash references

2009-02-18 Thread nadim khemir
On Wednesday 18 February 2009 22.04.27 Dana Hudes wrote: The spelling issue in hash is resolved with the use fields pragma. That requires you predeclare (horrors!) your hash keys. That is in no way different from using strict and having to declare your variables. It might heavy but in no way