-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modules::RequirePerlVersion, Compatibility::PerlMinimumVersionAndWhy
- Loading branch information
1 parent
fb44cfc
commit 79f4029
Showing
12 changed files
with
543 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; #our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragmas | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragma | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
use 5.006; # our, pragma | ||
use strict; | ||
use warnings; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env perl | ||
## no critic (Modules::RequireVersionVar) | ||
|
||
# ABSTRACT: Write an INI file from a bundle | ||
|
||
use 5.008; # utf8 | ||
use strict; | ||
use warnings; | ||
use utf8; | ||
|
||
our $VERSION = 0.001; | ||
|
||
use Carp qw( croak carp ); | ||
use Perl::Critic::ProfileCompiler::Util qw( create_bundle ); | ||
use Path::Tiny qw(path); | ||
|
||
## no critic (ErrorHandling::RequireUseOfExceptions) | ||
my $bundle = create_bundle('Example::Author::KENTNL'); | ||
$bundle->configure; | ||
|
||
my @stopwords = ( | ||
qw( | ||
) | ||
); | ||
for my $wordlist (@stopwords) { | ||
$bundle->add_or_append_policy_field( 'Documentation::PodSpelling' => ( 'stop_words' => $wordlist ) ); | ||
} | ||
|
||
#$bundle->add_or_append_policy_field( | ||
# 'Subroutines::ProhibitCallsToUndeclaredSubs' => ( 'exempt_subs' => 'String::Formatter::str_rf' ), ); | ||
|
||
$bundle->remove_policy('ErrorHandling::RequireUseOfExceptions'); | ||
|
||
#$bundle->remove_policy('CodeLayout::RequireUseUTF8'); | ||
|
||
#$bundle->remove_policy('ErrorHandling::RequireCarping'); | ||
$bundle->remove_policy('NamingConventions::Capitalization'); | ||
|
||
my $inf = $bundle->actionlist->get_inflated; | ||
|
||
my $config = $inf->apply_config; | ||
|
||
{ | ||
my $rcfile = path('./perlcritic.rc')->openw_utf8; | ||
$rcfile->print( $config->as_ini, "\n" ); | ||
close $rcfile or croak 'Something fubared closing perlcritic.rc'; | ||
} | ||
my $deps = $inf->own_deps; | ||
{ | ||
my $target = path('./misc'); | ||
$target->mkpath if not $target->is_dir; | ||
|
||
my $depsfile = $target->child('perlcritic.deps')->openw_utf8; | ||
for my $key ( sort keys %{$deps} ) { | ||
$depsfile->printf( "%s~%s\n", $key, $deps->{$key} ); | ||
*STDERR->printf( "%s => %s\n", $key, $deps->{$key} ); | ||
} | ||
close $depsfile or carp 'Something fubared closing perlcritic.deps'; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Perl::Critic::Policy::Lax::RequireExplicitPackage::ExceptForPragmata~0 | ||
Perl::Critic::Policy::Variables::ProhibitUnusedVarsStricter~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Bangs~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Compatibility~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Core~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Deprecated~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Itch~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Lax~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Moose~0 | ||
Perl::Critic::ProfileCompiler::Bundle::More~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Pulp~0 | ||
Perl::Critic::ProfileCompiler::Bundle::StricterSubs~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Swift~0 | ||
Perl::Critic::ProfileCompiler::Bundle::Tics~0 |
Oops, something went wrong.