ones.
--- /dev/null
+t/*_without_optional_dependencies.t
use strict;
use warnings;
+
+use lib 'inc';
+
use Module::Build;
+use Perl::Critic::BuildUtilities qw{
+ &recommended_module_versions
+ &test_wrappers_to_generate
+};
+
my $warning = <<'END_WARNING';
###################################################
'String::Format' => 1.13,
},
- recommends => {'File::HomeDir' => 0,
- 'Perl::Tidy' => 0,
-
- # All of these are for Documentation::PodSpelling
- 'File::Which' => 0,
- 'IPC::Open2' => 1,
- 'Pod::Spell' => 1,
- 'Text::ParseWords' => 3,
- },
+ recommends => { recommended_module_versions() },
build_requires => {'Test::More' => 0,
},
+ PL_files => {
+ 't/generate_without_optional_dependencies_wrappers.PL' => [
+ test_wrappers_to_generate()
+ ]
+ },
+
script_files => ['bin/perlcritic'],
+
+ add_to_cleanup => [
+ qw{
+ MANIFEST.bak
+ Makefile
+ Makefile.old
+ pm_to_blib
+ },
+ test_wrappers_to_generate(),
+ ],
);
$builder->create_build_script();
# $Revision$
##############################################################################
-[1.07] Released on 2007-08-21
+[1.072] Released on 2007-08-xx
+
+ Bug Fixes:
+ * The Makefile generated by Makefile.PL was not syntactically correct
+ according to some versions of Solaris.
+ * Fixed mis-definition of "quiet" value for the "--profile-strictness"
+ option.
+ * Enhanced testing with the absence of optional modules.
+
+[1.071] Released on 2007-08-21
The "Brown Paper Bag" Release
examples/perlcriticrc-conway
extras/KomodoIntegration.pod
extras/perlcritic.el
+inc/Perl/Critic/BuildUtilities.pm
INSTALL
lib/Perl/Critic.pm
lib/Perl/Critic/Config.pm
t/00_modules.t
t/01_bad_perlcriticrc
t/01_config.t
-t/01_config.t_without_optional_dependencies.t
t/01_config_bad_perlcriticrc.t
t/02_policy.t
t/03_pragmas.t
t/11_policyfactory.t
t/12_policylisting.t
t/13_bundled_policies.t
-t/13_bundled_policies.t_without_optional_dependencies.t
t/14_policy_parameters.t
t/15_statistics.t
t/20_policies.t
t/Documentation/RequirePodAtEnd.run
t/Documentation/RequirePodSections.run
t/ErrorHandling/RequireCarping.run
+t/generate_without_optional_dependencies_wrappers.PL
t/InputOutput/ProhibitBacktickOperators.run
t/InputOutput/ProhibitBarewordFileHandles.run
t/InputOutput/ProhibitInteractiveTest.run
^tmon\.out$
\.gdb_history$
\.ERR$
+^t/.*_without_optional_dependencies.t$
# Temp/backup files
~$
use strict;
use warnings;
+
+use lib 'inc';
+use lib 'lib';
+
use ExtUtils::MakeMaker;
+use Perl::Critic::BuildUtilities qw{ &test_wrappers_to_generate };
+use Perl::Critic::Utils qw{ :characters };
+
my $warning = <<'END_WARNING';
###################################################
ABSTRACT_FROM => 'lib/Perl/Critic.pm',
VERSION_FROM => 'lib/Perl/Critic.pm',
EXE_FILES => ['bin/perlcritic'],
- PL_FILES => {},
+ PL_FILES => {
+ 't/generate_without_optional_dependencies_wrappers.PL' => [
+ test_wrappers_to_generate()
+ ]
+ },
PREREQ_PM => {
'B::Keywords' => 1.05,
'Config::Tiny' => 2,
'String::Format' => 1.13,
'Test::More' => 0,
},
+ realclean => {FILES => join $SPACE, test_wrappers_to_generate() },
);
sub MY::postamble {
--- /dev/null
+##############################################################################
+# $URL$
+# $Date$
+# $Author$
+# $Revision$
+##############################################################################
+
+package Perl::Critic::BuildUtilities;
+
+use strict;
+use warnings;
+
+our $VERSION = 1.071;
+
+use base qw{ Exporter };
+
+our @EXPORT_OK = qw{
+ &recommended_module_versions
+ &test_wrappers_to_generate
+};
+
+sub recommended_module_versions {
+ return (
+ 'File::HomeDir' => 0,
+ 'Perl::Tidy' => 0,
+
+ # All of these are for Documentation::PodSpelling
+ 'File::Which' => 0,
+ 'IPC::Open2' => 1,
+ 'Pod::Spell' => 1,
+ 'Text::ParseWords' => 3,
+ );
+}
+
+sub test_wrappers_to_generate {
+ my @tests_to_be_wrapped = qw{
+ t/00_modules.t
+ t/01_config.t
+ t/01_config_bad_perlcriticrc.t
+ t/02_policy.t
+ t/03_pragmas.t
+ t/04_defaults.t
+ t/05_utils.t
+ t/05_utils_ppi.t
+ t/06_violation.t
+ t/07_perlcritic.t
+ t/08_document.t
+ t/09_theme.t
+ t/10_userprofile.t
+ t/11_policyfactory.t
+ t/12_policylisting.t
+ t/13_bundled_policies.t
+ t/14_policy_parameters.t
+ t/15_statistics.t
+ t/20_policy_podspelling.t
+ t/20_policy_requiretidycode.t
+ t/80_policysummary.t
+ t/92_memory_leaks.t
+ t/94_includes.t
+ };
+
+ return
+ map
+ { $_ . '_without_optional_dependencies.t' }
+ @tests_to_be_wrapped;
+}
+
+
+1;
+
+__END__
+
+=head1 NAME
+
+Perl::Critic::BuildUtilities - Common bits of compiling Perl::Critic.
+
+
+=head1 DESCRIPTION
+
+Various utilities used in assembling Perl::Critic, primary for use by
+*.PL programs that generate code.
+
+
+=head1 IMPORTABLE SUBROUTINES
+
+=over
+
+=item C<recommended_module_versions()>
+
+Returns a hash mapping between recommended (but not required) modules
+for Perl::Critic and the minimum version required of each module,
+
+
+=item C<test_wrappers_to_generate()>
+
+Returns a list of test wrappers to be generated by
+F<t/generate_without_optional_dependencies_wrappers.PL>.
+
+
+=back
+
+
+=head1 AUTHOR
+
+Elliot Shank C<< <perl@galumph.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2007, Elliot Shank C<< <perl@galumph.com> >>. All rights
+reserved.
+
+This program is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself. The full text of this license
+can be found in the LICENSE file included with this module.
+
+=cut
+
+##############################################################################
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 78
+# indent-tabs-mode: nil
+# c-indentation-style: bsd
+# End:
+# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab :
critique critique_with_violations
fcritique fcritique_with_violations
subtests_in_tree
- should_skip_author_tests
- get_author_test_skip_message
starting_points_including_examples
bundled_policy_names
names_of_policies_willing_to_work
return \%subtests;
}
-# Answer whether author test should be run.
-
-sub should_skip_author_tests {
- return !-d '.svn' && !$ENV{TEST_AUTHOR}
-}
-
-sub get_author_test_skip_message {
- ## no critic (RequireInterpolation);
- return 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.';
-}
-
sub starting_points_including_examples {
return (-e 'blib' ? 'blib' : 'lib', 'examples');
}
including the code string, test name, etc. See below for the syntax of the
F<.run> files.
-=item should_skip_author_tests()
-
-Answers whether author tests should run.
-
-=item get_author_test_skip_message()
-
-Returns a string containing the message that should be emitted when a test
-is skipped due to it being an author test when author tests are not enabled.
-
=item starting_points_including_examples()
Returns a list of the directories contain code that needs to be tested when it
If you need to pass any configuration parameters for your subtest, do so like
this:
- ## parms { allow_y => 0 }
+ ## parms { allow_y => '0' }
+
+Note that all the values in this hash must be strings because that's what
+Perl::Critic will hand you from a F<.perlcriticrc>.
If it's a TODO subtest (probably because of some weird corner of
PPI that we exercised that Adam is getting around to fixing, right?),
Readonly::Scalar our $PROFILE_STRICTNESS_WARN => 'warn';
Readonly::Scalar our $PROFILE_STRICTNESS_FATAL => 'fatal';
-Readonly::Scalar our $PROFILE_STRICTNESS_QUIET => 'fatal';
+Readonly::Scalar our $PROFILE_STRICTNESS_QUIET => 'quiet';
Readonly::Scalar our $PROFILE_STRICTNESS_DEFAULT => $PROFILE_STRICTNESS_WARN;
Readonly::Hash our %PROFILE_STRICTNESSES =>
ok( !critique(), 'Functional style, no args at all');
ok( !critique(undef, undef), 'Functional style, undef args');
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/00_modules.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
like( $EVAL_ERROR, qr/No policies matched/, 'invalid -single-policy' );
}
+#-----------------------------------------------------------------------------
+
# ensure we run true if this test is loaded by
-# t/01_config.t.without_optional_dependencies.t
+# t/01_config.t_without_optional_dependencies.t
1;
##############################################################################
+++ /dev/null
-#!perl
-
-##############################################################################
-# $URL$
-# $Date$
-# $Author$
-# $Revision$
-##############################################################################
-
-use strict;
-use warnings;
-
-use lib 't/tlib';
-
-use English qw(-no_match_vars);
-
-use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
- should_skip_author_tests
- get_author_test_skip_message
- get_skip_all_tests_tap
-};
-
-#-----------------------------------------------------------------------------
-
-if ( should_skip_author_tests() ) {
- print get_skip_all_tests_tap(), get_author_test_skip_message(), "\n";
- exit 0;
-}
-
-eval <<'END_HIDE_MODULES';
-use Test::Without::Module qw{
- File::HomeDir
- File::Which
- IPC::Open2
- Perl::Tidy
- Pod::Spell
- Pod::Spell
- Text::ParseWords
-};
-END_HIDE_MODULES
-
-if ( $EVAL_ERROR ) {
- print
- get_skip_all_tests_tap(),
- 'Test::Without::Module required to test with the ',
- "absence of optional modules\n";
- exit 0;
-}
-
-
-require 't/01_config.t';
-
-##############################################################################
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 78
-# indent-tabs-mode: nil
-# c-indentation-style: bsd
-# End:
-# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab :
/xms;
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/01_config_bad_perlcriticrc.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
is( $p->to_string(), $expected_string, 'Stringification by to_string()');
is( "$p", $expected_string, 'Stringification by overloading');
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/02_policy.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
is( critique(\$code, {-profile => $profile, -severity => 4} ), 1,
'no critic & RequireExplicitPackage');
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/03_pragmas.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
# mode: cperl
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/04_defaults.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
# mode: cperl
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/05_utils.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/05_utils_ppi.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/06_violation.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
eval { @ARGV = qw( -severity 6 ); get_options() };
like( $EVAL_ERROR, qr/out of range/, '-severity too large' );
}
+
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/07_perlcritic.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
}
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/08_document.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
return any { $_ eq $theme } $policy->get_themes();
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/09_theme.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
# mode: cperl
is( $got, $expected, 'PERLCRITIC environment variable');
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/10_userprofile.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
$last_warning = q{};
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/11_policyfactory.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
# mode: cperl
}
#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/12_policylisting.t_without_optional_dependencies.t
+1;
+
+#-----------------------------------------------------------------------------
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
my $test_label = 'successfully loaded policies matches MANIFEST';
is_deeply( \@found_policies, [bundled_policy_names()], $test_label );
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/13_bundled_policies.t_without_optional_dependencies.t
+1;
+
##############################################################################
# Local Variables:
# mode: cperl
+++ /dev/null
-#!perl
-
-##############################################################################
-# $URL$
-# $Date$
-# $Author$
-# $Revision$
-##############################################################################
-
-use strict;
-use warnings;
-
-use lib 't/tlib';
-
-use English qw(-no_match_vars);
-
-use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
- should_skip_author_tests
- get_author_test_skip_message
- get_skip_all_tests_tap
-};
-
-#-----------------------------------------------------------------------------
-
-if ( should_skip_author_tests() ) {
- print get_skip_all_tests_tap(), get_author_test_skip_message(), "\n";
- exit 0;
-}
-
-eval <<'END_HIDE_MODULES';
-use Test::Without::Module qw{
- File::HomeDir
- File::Which
- IPC::Open2
- Perl::Tidy
- Pod::Spell
- Pod::Spell
- Text::ParseWords
-};
-END_HIDE_MODULES
-
-if ( $EVAL_ERROR ) {
- print
- get_skip_all_tests_tap(),
- 'Test::Without::Module required to test with the ',
- "absence of optional modules\n";
- exit 0;
-}
-
-
-require 't/13_bundled_policies.t';
-
-##############################################################################
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 78
-# indent-tabs-mode: nil
-# c-indentation-style: bsd
-# End:
-# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab :
#!perl
##############################################################################
-# $URL: http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/t/13_bundled_policies.t $
-# $Date: 2006-12-09 13:31:57 -0800 (Sat, 09 Dec 2006) $
-# $Author: chrisdolan $
-# $Revision: 1056 $
+# $URL$
+# $Date$
+# $Author$
+# $Revision$
##############################################################################
use strict;
}
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/14_policy_parameters.t_without_optional_dependencies.t
+1;
+
###############################################################################
# Local Variables:
# mode: cperl
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/15_statistics.t_without_optional_dependencies.t
+1;
+
+###############################################################################
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 78
+# indent-tabs-mode: nil
+# c-indentation-style: bsd
+# End:
+# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab :
# c-indentation-style: bsd
# End:
# ex: set ts=8 sts=4 sw=4 tw=78 expandtab ft=perl:
-
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/20_policy_podspelling.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/20_policy_requiretidycode.t_without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
use strict;
use warnings;
+
+use lib 't/tlib';
+
use English qw( -no_match_vars );
use File::Spec qw();
use Perl::Critic::PolicyFactory ( -test => 1 );
use Perl::Critic::Utils qw{ :characters };
-use Perl::Critic::TestUtils qw{
- should_skip_author_tests get_author_test_skip_message
- starting_points_including_examples
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
};
+use Perl::Critic::TestUtils qw{ starting_points_including_examples };
if (should_skip_author_tests()) {
plan skip_all => get_author_test_skip_message();
# $Revision$
##############################################################################
+profile-strictness = quiet
severity = 1
#-----------------------------------------------------------------------------
+# Policies from other distributions that we don't want.
+[-CodeLayout::RequireUseUTF8]
+[-Documentation::RequirePODUseEncodingUTF8]
+# Perl::MinimumVersion is buggy.
+[-Modules::PerlMinimumVersion]
+[-Modules::RequirePerlVersion]
+
+#-----------------------------------------------------------------------------
+
[-CodeLayout::RequireTidyCode]
[Documentation::RequirePodSections]
# $Revision$
##############################################################################
-
use strict;
use warnings;
+
+use lib 't/tlib';
+
use File::Spec;
use Test::More;
use List::MoreUtils qw(any);
+
use Perl::Critic::PolicyFactory ( -test => 1 );
-use Perl::Critic::TestUtils qw{ should_skip_author_tests get_author_test_skip_message
- bundled_policy_names };
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
+};
+use Perl::Critic::TestUtils qw{ bundled_policy_names };
#-----------------------------------------------------------------------------
fail 'Cannot locate the PolicySummary.pod file';
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/80_policysummary.t.without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
#-----------------------------------------------------------------------------
+# ensure we run true if this test is loaded by
+# t/92_memory_leaks.t.without_optional_dependencies.t
+1;
###############################################################################
# Local Variables:
#!perl -w
use warnings;
use strict;
+
+use lib 't/tlib';
+
use File::Find;
use Test::More;
-use Perl::Critic::TestUtils qw{ should_skip_author_tests get_author_test_skip_message };
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
+};
if (should_skip_author_tests()) {
plan skip_all => get_author_test_skip_message();
use warnings;
use strict;
+use lib 't/tlib';
+
use Test::More;
use File::Find;
use PPI::Document;
-use Perl::Critic::TestUtils qw{ should_skip_author_tests get_author_test_skip_message };
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
+};
if (should_skip_author_tests()) {
plan skip_all => get_author_test_skip_message();
return match($pkg, $deps, $thispkg);
}
+#-----------------------------------------------------------------------------
+
+# ensure we run true if this test is loaded by
+# t/94_includes.t.t.without_optional_dependencies.t
+1;
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
use strict;
use warnings;
+
+use lib 't/tlib';
+
use Test::More;
-use Perl::Critic::TestUtils qw{ should_skip_author_tests get_author_test_skip_message };
+
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
+};
if (should_skip_author_tests()) {
plan skip_all => get_author_test_skip_message();
# $Revision$
##############################################################################
-
use strict;
use warnings;
+
+use lib 't/tlib';
+
use Test::More;
-use Perl::Critic::TestUtils qw{
- should_skip_author_tests get_author_test_skip_message
- starting_points_including_examples
+
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
};
+use Perl::Critic::TestUtils qw{ starting_points_including_examples };
#-----------------------------------------------------------------------------
--- /dev/null
+#!/usr/bin/env perl
+
+##############################################################################
+# $URL$
+# $Date$
+# $Author$
+# $Revision$
+##############################################################################
+
+use strict;
+use warnings;
+
+use lib 'inc';
+
+use English qw{-no_match_vars};
+
+use Carp qw{ confess };
+use Fatal qw{ open close };
+
+use Perl::Critic::BuildUtilities qw{ &recommended_module_versions };
+use Perl::Critic::Utils qw{ :characters };
+
+our $VERSION = 1.071;
+
+print "Generating tests that hide modules and then run other tests.\n";
+
+my $this_program = __FILE__;
+
+my @modules_to_hide = sort keys %{ { recommended_module_versions } };
+my $modules_to_hide = join "\n" . $SPACE x 4, @modules_to_hide;
+
+foreach my $test_program_name (@ARGV) {
+ my ($wrapped_test_name) =
+ $test_program_name =~ m{
+ \A
+ ( t/ [\w.]+ \.t ) # test to be wrapped
+ _without_optional_dependencies\.t # suffix the new test will have
+ \z
+ }xms;
+ if (not $wrapped_test_name) {
+ confess
+ 'Could not figure out the name of the test to wrap from "'
+ . $test_program_name
+ . q{".};
+ }
+
+ print "Generating $test_program_name.\n";
+ open my $test_program, '>', $test_program_name
+ or die "Could not open $test_program_name: $ERRNO";
+
+ print {$test_program} <<"END_TEST_PROGRAM";
+#!/usr/bin/env perl
+
+# Do not edit!!! This program generated by $this_program.
+
+use strict;
+use warnings;
+use English qw{-no_match_vars};
+
+our \$VERSION = $VERSION;
+
+use lib 't/tlib';
+
+use English qw(-no_match_vars);
+
+use Perl::Critic::TestUtilitiesWithMinimalDependencies qw{
+ should_skip_author_tests
+ get_author_test_skip_message
+ get_skip_all_tests_tap
+};
+
+#-----------------------------------------------------------------------------
+
+if ( should_skip_author_tests() ) {
+ print get_skip_all_tests_tap(), get_author_test_skip_message(), "\\n";
+ exit 0;
+}
+
+eval <<'END_HIDE_MODULES';
+use Test::Without::Module qw{
+ $modules_to_hide
+};
+END_HIDE_MODULES
+
+if ( \$EVAL_ERROR ) {
+ print
+ get_skip_all_tests_tap(),
+ 'Test::Without::Module required to test with the ',
+ "absence of optional modules\\n";
+ exit 0;
+}
+
+
+require '$wrapped_test_name';
+END_TEST_PROGRAM
+
+ close $test_program;
+}
+
+print "Done.\n";
+
+__END__
+
+#-----------------------------------------------------------------------------
+
+=pod
+
+=for stopwords
+
+=head1 NAME
+
+generate_without_additional_dependencies_wrappers.PL - generate tests that are wrappers around other tests but which hide the existence of modules first.
+
+
+=head1 SYNOPSIS
+
+ generate_without_additional_dependencies_wrappers.PL \
+ t/00_modules.t_without_optional_dependencies.t \
+ t/01_config.t_without_optional_dependencies.t \
+ t/13_bundled_policies.t_without_optional_dependencies.t
+
+
+=head1 DESCRIPTION
+
+Release 1.07 of Perl::Critic was an embarrassment because there were no tests
+of core without the presence of optional modules. This program generates
+wrappers for other tests that hide those optional modules.
+
+
+=head1 AUTHOR
+
+Elliot Shank C<< <perl@galumph.org> >>
+
+
+=head1 COPYRIGHT
+
+Copyright (c) 2007 Elliot Shank. All rights reserved.
+
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself. The full text of this license can be found in
+the LICENSE file included with this module.
+
+
+=cut
+
+##############################################################################
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 78
+# indent-tabs-mode: nil
+# c-indentation-style: bsd
+# End:
+# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab :