Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Perl-Critic CPAN distribution.

Report information
The Basics
Id: 29554
Status: rejected
Priority: 0/
Queue: Test-Perl-Critic

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: hashref treated as object = randomly and incorrectly failing
http://cpantesters.perl.org/show/Data-Rand.html Two strange issues: 1) the same version of Test::Perl::Critic (1.01) give different results, some pass, some fail 2) The failures are this: Private Member Data shouldn't be accessed directly. at line XX, column XX. Accessing an objects data directly breaks encapsulation and should be avoided. Example: $object-> { some_key }. (Severity: 5) Trouble is this is not an OO based module, the errors are in reference to a hashref like so: $options_hr->{'details'}
From: ELLIOTJS [...] cpan.org
It would appear that the tester has Perl-Critic-Nits installed, which is the distribution containing the Policy that is complaining here. This speaks to the need to not have Test::Perl::Critic run as part of the default test suite. The user may have additional policies installed that the author does not which will cause failures. Test::Perl::Critic should only be run as part of author tests. Perl::Critic itself does not run the self-compliance tests by default. Have a look at http://search.cpan.org/src/ELLIOTJS/Perl-Critic-1.078/t/40_criticize.t and http://search.cpan.org/src/ELLIOTJS/Perl-Critic-1.078/t/tlib/Perl/Critic/ TestUtilitiesWithMinimalDependencies.pm.
I'll disable the perlcritic test in the next release.