|
Revision 16346, 0.5 kB
(checked in by hanekomu, 5 years ago)
|
|
first step in moving towards a standard-style dist
|
| Line | |
|---|
| 1 | #!perl -w |
|---|
| 2 | |
|---|
| 3 | use strict; |
|---|
| 4 | use warnings; |
|---|
| 5 | |
|---|
| 6 | use FindBin '$Bin'; |
|---|
| 7 | use File::Spec; |
|---|
| 8 | use UNIVERSAL::require; |
|---|
| 9 | use Test::More; |
|---|
| 10 | |
|---|
| 11 | plan skip_all => |
|---|
| 12 | 'Author test. Set $ENV{TEST_AUTHOR} to a true value to run.' |
|---|
| 13 | unless $ENV{TEST_AUTHOR}; |
|---|
| 14 | |
|---|
| 15 | my %opt; |
|---|
| 16 | my $rc_file = File::Spec->catfile($Bin, 'perlcriticrc'); |
|---|
| 17 | $opt{'-profile'} = $rc_file if -r $rc_file; |
|---|
| 18 | |
|---|
| 19 | if (Perl::Critic->require('1.078') && |
|---|
| 20 | Test::Perl::Critic->require && |
|---|
| 21 | Test::Perl::Critic->import(%opt)) { |
|---|
| 22 | |
|---|
| 23 | all_critic_ok("lib"); |
|---|
| 24 | } else { |
|---|
| 25 | plan skip_all => $@; |
|---|
| 26 | } |
|---|
| 27 | |
|---|