Author: coke
Date: Fri Mar 28 07:18:22 2008
New Revision: 26592
Modified:
trunk/t/codingstd/perlcritic.t
Log:
[codingstd]
Only generate diag output about this test if we're actually going
to run the test.
Modified: trunk/t/codingstd/perlcritic.t
==============================================================================
--- trunk/t/codingstd/perlcritic.t (original)
+++ trunk/t/codingstd/perlcritic.t Fri Mar 28 07:18:22 2008
@@ -151,12 +151,6 @@
$default_policies{'Bangs::ProhibitFlagComments'} = 1;
}
- # Give a diag to let users know if this is doing anything, how to repeat.
- eval { require Perl::Tidy; };
- if ( !$@ ) {
- diag "Using $perl_tidy_conf for Perl::Tidy settings";
- }
-
# decide which policy group to use
if ( $policy_group eq 'default' ) {
%policies = %default_policies;
@@ -170,6 +164,14 @@
else {
warn "Unknown policy group, using 'default' policy group";
}
+
+ # Give a diag to let users know if this is doing anything, how to repeat.
+ if (exists $policies{'CodeLayout::RequireTidyCode'}) {
+ eval { require Perl::Tidy; };
+ if ( !$@ ) {
+ diag "Using $perl_tidy_conf for Perl::Tidy settings";
+ }
+ }
}
if ($list_policies_flag) {