Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Sep 6, 2014
0 parents commit 087fca5
Show file tree
Hide file tree
Showing 9 changed files with 624 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.build
Dist-Zilla-Plugin-if-ENV-*
2 changes: 2 additions & 0 deletions .perltidyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-i 2
-l 130
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Release history for Dist-Zilla-Plugin-if-ENV

{{$NEXT}}
- First version.

23 changes: 23 additions & 0 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
; Generated by Dist::Zilla::Plugin::Author::KENTNL::DistINI version 2.020000 at Sat Sep 6 13:31:58 2014
name = Dist-Zilla-Plugin-if-ENV
author = Kent Fredric <kentnl@cpan.org>
license = Perl_5
copyright_holder = Kent Fredric <kentfredric@gmail.com>

; Uncomment this to bootstrap via self
; [Bootstrap::lib]

[@Author::KENTNL]
:version = 2.020000
git_versions = 1
normal_form = numify
mantissa = 6
toolkit = eumm
toolkit_hardness = soft
bumpversions = 1
copyfiles = LICENSE
srcreadme = mkdn
twitter_hash_tags = #perl #cpan
; auto_prereqs_skip = File::Find

[Prereqs]
19 changes: 19 additions & 0 deletions lib/Dist/Zilla/Plugin/if/ENV.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use 5.008; # utf8
use strict;
use warnings;
use utf8;

package Dist::Zilla::Plugin::if::ENV;

our $VERSION = '0.001000';

# ABSTRACT:

# AUTHORITY

use Moose;

__PACKAGE__->meta->make_immutable;
no Moose;

1;
55 changes: 55 additions & 0 deletions maint/perlcritic.rc.gen.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/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';
}

14 changes: 14 additions & 0 deletions misc/perlcritic.deps
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
Loading

0 comments on commit 087fca5

Please sign in to comment.