Created
March 15, 2016 20:32
-
-
Save 2shortplanks/a788b6539b1bfd033e60 to your computer and use it in GitHub Desktop.
Script I use to write my dist.ini
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
#!/opt/markperl/bin/perl | |
use strict; | |
use warnings; | |
use Mojo::Template; | |
use Path::Class qw(file dir); | |
use Cwd qw(cwd); | |
my $dist_name = dir(cwd)->dir_list(-1); | |
my @bits = split /-/, $dist_name; | |
unshift @bits, 'lib'; | |
pop @bits; | |
dir(@bits)->mkpath; | |
my $template = <<'EOF'; | |
% my $dist_name = shift; | |
name = <%= $dist_name %> | |
author = Mark Fowler <mark@twoshortplanks.com> | |
copyright_holder = Mark Fowler | |
[@MAXMIND] | |
dist = <%= $dist_name %> | |
-remove = MAXMIND::Contributors | |
-remove = UploadToCPAN | |
%= join '', map { "stopwords = $_\n" } split /-/, $dist_name; | |
[UploadToCPAN] | |
EOF | |
print { file('dist.ini')->openw } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment