├── .gitignore ├── t └── use.t ├── .travis.yml ├── dist.ini ├── lib ├── Dist │ ├── Zilla │ │ ├── MintingProfile │ │ │ └── Milla.pm │ │ ├── Plugin │ │ │ └── Milla │ │ │ │ ├── MetaGeneratedBy.pm │ │ │ │ ├── FirstBuild.pm │ │ │ │ └── MintFiles.pm │ │ └── PluginBundle │ │ │ └── Milla.pm │ ├── Milla │ │ ├── App.pm │ │ └── Tutorial.pod │ └── Milla.pm └── Milla.pm ├── profiles └── default │ ├── profile.ini │ └── Module.pm.template ├── script └── milla ├── cpanfile ├── Build.PL ├── META.json ├── Changes ├── README.md └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /Dist-Milla-* 2 | /.build 3 | /_build* 4 | /Build 5 | MYMETA.* 6 | !META.json 7 | -------------------------------------------------------------------------------- /t/use.t: -------------------------------------------------------------------------------- 1 | use strict; 2 | use Test::More; 3 | use Dist::Milla; 4 | 5 | ok 1; 6 | 7 | done_testing; 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: perl 2 | perl: 3 | - "5.22" 4 | - "5.24" 5 | - "5.26" 6 | - "5.28" 7 | - "5.30" 8 | -------------------------------------------------------------------------------- /dist.ini: -------------------------------------------------------------------------------- 1 | [@Milla] 2 | installer = ModuleBuild 3 | 4 | [ModuleShareDirs] 5 | Dist::Zilla::MintingProfile::Milla = profiles 6 | -------------------------------------------------------------------------------- /lib/Dist/Zilla/MintingProfile/Milla.pm: -------------------------------------------------------------------------------- 1 | package Dist::Zilla::MintingProfile::Milla; 2 | use Moose; 3 | with 'Dist::Zilla::Role::MintingProfile::ShareDir'; 4 | 5 | 6 | 1; 7 | -------------------------------------------------------------------------------- /lib/Milla.pm: -------------------------------------------------------------------------------- 1 | package Milla; 2 | 1; 3 | __END__ 4 | 5 | =head1 NAME 6 | 7 | Milla - Dist::Milla alias 8 | 9 | =head1 DESCRIPTION 10 | 11 | See L. 12 | 13 | =cut 14 | -------------------------------------------------------------------------------- /profiles/default/profile.ini: -------------------------------------------------------------------------------- 1 | [Git::Init] 2 | commit = 0 3 | 4 | [TemplateModule/:DefaultModuleMaker] 5 | template = Module.pm.template 6 | 7 | [Milla::MintFiles] 8 | [Milla::FirstBuild] 9 | -------------------------------------------------------------------------------- /lib/Dist/Zilla/Plugin/Milla/MetaGeneratedBy.pm: -------------------------------------------------------------------------------- 1 | package Dist::Zilla::Plugin::Milla::MetaGeneratedBy; 2 | use Moose; 3 | with 'Dist::Zilla::Role::MetaProvider'; 4 | 5 | use Dist::Milla; 6 | 7 | sub metadata { 8 | my $self = shift; 9 | 10 | my $generated_by = sprintf "Dist::Milla version %s, Dist::Zilla version %s", 11 | Dist::Milla->VERSION, $self->zilla->VERSION; 12 | 13 | return { 14 | generated_by => $generated_by, 15 | }; 16 | } 17 | 18 | no Moose; 19 | __PACKAGE__->meta->make_immutable; 20 | 21 | 1; 22 | -------------------------------------------------------------------------------- /lib/Dist/Zilla/Plugin/Milla/FirstBuild.pm: -------------------------------------------------------------------------------- 1 | package Dist::Zilla::Plugin::Milla::FirstBuild; 2 | use Moose; 3 | with 'Dist::Zilla::Role::AfterMint'; 4 | 5 | use Dist::Milla::App; 6 | use File::pushd; 7 | use Git::Wrapper; 8 | 9 | sub after_mint { 10 | my($self, $opts) = @_; 11 | 12 | $self->log("Running the initial build & clean"); 13 | 14 | { 15 | my $wd = File::pushd::pushd($opts->{mint_root}); 16 | for my $cmd (['build', '--no-tgz'], ['clean']) { 17 | local @ARGV = (@$cmd); 18 | Dist::Milla::App->run; 19 | } 20 | } 21 | 22 | my $git = Git::Wrapper->new("$opts->{mint_root}"); 23 | $git->add("$opts->{mint_root}"); 24 | } 25 | 26 | no Moose; 27 | __PACKAGE__->meta->make_immutable; 28 | 1; 29 | -------------------------------------------------------------------------------- /profiles/default/Module.pm.template: -------------------------------------------------------------------------------- 1 | package {{$name}}; 2 | 3 | use strict; 4 | use 5.012; 5 | our $VERSION = '0.01'; 6 | 7 | 1; 8 | __END__ 9 | 10 | =encoding utf-8 11 | 12 | =head1 NAME 13 | 14 | {{$name}} - Blah blah blah 15 | 16 | =head1 SYNOPSIS 17 | 18 | use {{$name}}; 19 | 20 | =head1 DESCRIPTION 21 | 22 | {{$name}} is 23 | 24 | =head1 AUTHOR 25 | 26 | {{(my $a = $dist->authors->[0]) =~ s/([<>])/"E<" . {qw(< lt > gt)}->{$1} . ">"/eg; $a}} 27 | 28 | =head1 COPYRIGHT 29 | 30 | Copyright {{$dist->copyright_year}}- {{(my $a = $dist->authors->[0]) =~ s/\s*<.*$//; $a}} 31 | 32 | =head1 LICENSE 33 | 34 | This library is free software; you can redistribute it and/or modify 35 | it under the same terms as Perl itself. 36 | 37 | =head1 SEE ALSO 38 | 39 | =cut 40 | -------------------------------------------------------------------------------- /lib/Dist/Milla/App.pm: -------------------------------------------------------------------------------- 1 | package Dist::Milla::App; 2 | use strict; 3 | use parent 'Dist::Zilla::App'; 4 | use version; our $VERSION = version->declare('v1.0.22'); 5 | 6 | sub _default_command_base { 'Dist::Zilla::App::Command' } 7 | 8 | sub prepare_command { 9 | my $self = shift; 10 | 11 | my($cmd, $opt, @args) = $self->SUPER::prepare_command(@_); 12 | 13 | if ($cmd->isa("Dist::Zilla::App::Command::install")) { 14 | $opt->{install_command} ||= 'cpanm .'; 15 | } elsif ($cmd->isa("Dist::Zilla::App::Command::release")) { 16 | $ENV{DZIL_CONFIRMRELEASE_DEFAULT} = 1 17 | unless defined $ENV{DZIL_CONFIRMRELEASE_DEFAULT}; 18 | } elsif ($cmd->isa("Dist::Zilla::App::Command::new")) { 19 | $opt->{provider} = 'Milla'; 20 | } 21 | 22 | return $cmd, $opt, @args; 23 | } 24 | 25 | 1; 26 | -------------------------------------------------------------------------------- /script/milla: -------------------------------------------------------------------------------- 1 | #!perl 2 | use strict; 3 | use Dist::Milla::App; 4 | 5 | Dist::Milla::App->run; 6 | 7 | __END__ 8 | 9 | =head1 NAME 10 | 11 | milla - wrapper for Milla profile 12 | 13 | =head1 DESCRIPTION 14 | 15 | C is a command line wrapper for L. It's a wrapper 16 | for C, but with overriding default arguments for some commands 17 | such as C, C and C. 18 | 19 | Specifically: 20 | 21 | =over 4 22 | 23 | =item * 24 | 25 | C is equivalent to C 26 | 27 | =item * 28 | 29 | C is equivalent to C 30 | 31 | =item * 32 | 33 | C is equivalent to C 34 | 35 | =back 36 | 37 | Other commands would behave exactly the same as C. 38 | 39 | =cut 40 | 41 | -------------------------------------------------------------------------------- /lib/Dist/Zilla/Plugin/Milla/MintFiles.pm: -------------------------------------------------------------------------------- 1 | package Dist::Zilla::Plugin::Milla::MintFiles; 2 | use Moose; 3 | extends 'Dist::Zilla::Plugin::InlineFiles'; 4 | with 'Dist::Zilla::Role::TextTemplate'; 5 | 6 | override 'merged_section_data' => sub { 7 | my $self = shift; 8 | 9 | my $data = super; 10 | 11 | for my $name (keys %$data) { 12 | $data->{$name} = \$self->fill_in_string( 13 | ${ $data->{$name} }, { 14 | dist => \($self->zilla), 15 | plugin => \($self), 16 | }, 17 | ); 18 | } 19 | 20 | return $data; 21 | }; 22 | 23 | 1; 24 | __DATA__ 25 | ___[ dist.ini ]___ 26 | [@Milla] 27 | ___[ Changes ]___ 28 | Revision history for {{ $dist->name }} 29 | 30 | {{ '{{$NEXT}}' }} 31 | - Initial release 32 | ___[ .gitignore ]___ 33 | /{{$dist->name}}-* 34 | /.build 35 | /_build* 36 | /Build 37 | MYMETA.* 38 | !META.json 39 | /.prove 40 | ___[ cpanfile ]___ 41 | requires 'perl', '5.012'; 42 | 43 | # requires 'Some::Module', 'VERSION'; 44 | 45 | on test => sub { 46 | requires 'Test::More', '0.96'; 47 | }; 48 | ___[ t/basic.t ]___ 49 | use strict; 50 | use Test::More; 51 | use {{ (my $mod = $dist->name) =~ s/-/::/g; $mod }}; 52 | 53 | # replace with the actual test 54 | ok 1; 55 | 56 | done_testing; 57 | -------------------------------------------------------------------------------- /cpanfile: -------------------------------------------------------------------------------- 1 | requires 'perl', 5.012; 2 | 3 | requires 'Dist::Zilla', 6; 4 | requires 'Module::CPANfile', 0.9025; 5 | 6 | requires 'Dist::Zilla::Plugin::CheckChangesHasContent'; 7 | requires 'Dist::Zilla::Plugin::ConfirmRelease'; 8 | requires 'Dist::Zilla::Plugin::CopyFilesFromBuild', '0.163040'; 9 | requires 'Dist::Zilla::Plugin::CopyFilesFromRelease'; 10 | requires 'Dist::Zilla::Plugin::ExecDir'; 11 | requires 'Dist::Zilla::Plugin::ExtraTests'; 12 | requires 'Dist::Zilla::Plugin::Git::Contributors', '0.009'; 13 | requires 'Dist::Zilla::Plugin::Git::Init', '2.012'; # commit = 0 14 | requires 'Dist::Zilla::Plugin::Git::GatherDir'; 15 | requires 'Dist::Zilla::Plugin::GithubMeta'; 16 | requires 'Dist::Zilla::Plugin::License'; 17 | requires 'Dist::Zilla::Plugin::LicenseFromModule', '0.05'; # load from .pod too 18 | requires 'Dist::Zilla::Plugin::Manifest'; 19 | requires 'Dist::Zilla::Plugin::MetaJSON'; 20 | requires 'Dist::Zilla::Plugin::MetaYAML'; 21 | requires 'Dist::Zilla::Plugin::ModuleBuildTiny'; 22 | requires 'Dist::Zilla::Plugin::NameFromDirectory', '0.04'; 23 | requires 'Dist::Zilla::Plugin::NextRelease'; 24 | requires 'Dist::Zilla::Plugin::PodSyntaxTests'; 25 | requires 'Dist::Zilla::Plugin::Prereqs::FromCPANfile', '0.06'; 26 | requires 'Dist::Zilla::Plugin::ReadmeAnyFromPod', '0.163250'; 27 | requires 'Dist::Zilla::Plugin::ReadmeFromPod', '0.37'; 28 | requires 'Dist::Zilla::Plugin::ReversionOnRelease', '0.04'; 29 | requires 'Dist::Zilla::Plugin::ShareDir'; 30 | requires 'Dist::Zilla::Plugin::StaticInstall'; 31 | requires 'Dist::Zilla::Plugin::Test::Compile'; 32 | requires 'Dist::Zilla::Plugin::TestRelease'; 33 | requires 'Dist::Zilla::Plugin::UploadToCPAN'; 34 | requires 'Dist::Zilla::Plugin::VersionFromMainModule'; 35 | requires 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; 36 | requires 'Dist::Zilla::Role::PluginBundle::PluginRemover'; 37 | requires 'Dist::Zilla::PluginBundle::Git'; 38 | 39 | on test => sub { 40 | requires 'Test::More', '0.88'; 41 | }; 42 | -------------------------------------------------------------------------------- /Build.PL: -------------------------------------------------------------------------------- 1 | 2 | # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v6.025. 3 | use strict; 4 | use warnings; 5 | 6 | use Module::Build 0.3601; 7 | 8 | 9 | my %module_build_args = ( 10 | "build_requires" => { 11 | "Module::Build" => "0.3601" 12 | }, 13 | "configure_requires" => { 14 | "Module::Build" => "0.3601" 15 | }, 16 | "dist_abstract" => "Distribution builder, Opinionated but Unobtrusive", 17 | "dist_author" => [ 18 | "Tatsuhiko Miyagawa " 19 | ], 20 | "dist_name" => "Dist-Milla", 21 | "dist_version" => "v1.0.22", 22 | "license" => "perl", 23 | "module_name" => "Dist::Milla", 24 | "recursive_test_files" => 1, 25 | "requires" => { 26 | "Dist::Zilla" => 6, 27 | "Dist::Zilla::Plugin::CheckChangesHasContent" => 0, 28 | "Dist::Zilla::Plugin::ConfirmRelease" => 0, 29 | "Dist::Zilla::Plugin::CopyFilesFromBuild" => "0.163040", 30 | "Dist::Zilla::Plugin::CopyFilesFromRelease" => 0, 31 | "Dist::Zilla::Plugin::ExecDir" => 0, 32 | "Dist::Zilla::Plugin::ExtraTests" => 0, 33 | "Dist::Zilla::Plugin::Git::Contributors" => "0.009", 34 | "Dist::Zilla::Plugin::Git::GatherDir" => 0, 35 | "Dist::Zilla::Plugin::Git::Init" => "2.012", 36 | "Dist::Zilla::Plugin::GithubMeta" => 0, 37 | "Dist::Zilla::Plugin::License" => 0, 38 | "Dist::Zilla::Plugin::LicenseFromModule" => "0.05", 39 | "Dist::Zilla::Plugin::Manifest" => 0, 40 | "Dist::Zilla::Plugin::MetaJSON" => 0, 41 | "Dist::Zilla::Plugin::MetaYAML" => 0, 42 | "Dist::Zilla::Plugin::ModuleBuildTiny" => 0, 43 | "Dist::Zilla::Plugin::NameFromDirectory" => "0.04", 44 | "Dist::Zilla::Plugin::NextRelease" => 0, 45 | "Dist::Zilla::Plugin::PodSyntaxTests" => 0, 46 | "Dist::Zilla::Plugin::Prereqs::FromCPANfile" => "0.06", 47 | "Dist::Zilla::Plugin::ReadmeAnyFromPod" => "0.163250", 48 | "Dist::Zilla::Plugin::ReadmeFromPod" => "0.37", 49 | "Dist::Zilla::Plugin::ReversionOnRelease" => "0.04", 50 | "Dist::Zilla::Plugin::ShareDir" => 0, 51 | "Dist::Zilla::Plugin::StaticInstall" => 0, 52 | "Dist::Zilla::Plugin::Test::Compile" => 0, 53 | "Dist::Zilla::Plugin::TestRelease" => 0, 54 | "Dist::Zilla::Plugin::UploadToCPAN" => 0, 55 | "Dist::Zilla::Plugin::VersionFromMainModule" => 0, 56 | "Dist::Zilla::PluginBundle::Git" => 0, 57 | "Dist::Zilla::Role::PluginBundle::Config::Slicer" => 0, 58 | "Dist::Zilla::Role::PluginBundle::PluginRemover" => 0, 59 | "Module::CPANfile" => "0.9025", 60 | "perl" => "5.012" 61 | }, 62 | "script_files" => [ 63 | "script/milla" 64 | ], 65 | "share_dir" => { 66 | "module" => { 67 | "Dist::Zilla::MintingProfile::Milla" => "profiles" 68 | } 69 | }, 70 | "test_requires" => { 71 | "Test::More" => "0.88" 72 | } 73 | ); 74 | 75 | 76 | my %fallback_build_requires = ( 77 | "Module::Build" => "0.3601", 78 | "Test::More" => "0.88" 79 | ); 80 | 81 | 82 | unless ( eval { Module::Build->VERSION(0.4004) } ) { 83 | delete $module_build_args{test_requires}; 84 | $module_build_args{build_requires} = \%fallback_build_requires; 85 | } 86 | 87 | my $build = Module::Build->new(%module_build_args); 88 | 89 | 90 | $build->create_build_script; 91 | -------------------------------------------------------------------------------- /lib/Dist/Zilla/PluginBundle/Milla.pm: -------------------------------------------------------------------------------- 1 | package Dist::Zilla::PluginBundle::Milla; 2 | 3 | use strict; 4 | use version; our $VERSION = version->declare('v1.0.22'); 5 | 6 | use Dist::Milla; 7 | use Moose; 8 | with 'Dist::Zilla::Role::PluginBundle::Easy', 9 | 'Dist::Zilla::Role::PluginBundle::PluginRemover', 10 | 'Dist::Zilla::Role::PluginBundle::Config::Slicer'; 11 | 12 | use namespace::autoclean; 13 | 14 | has installer => ( 15 | is => 'ro', 16 | isa => 'Str', 17 | lazy => 1, 18 | default => sub { $_[0]->payload->{installer} || 'ModuleBuildTiny' }, 19 | ); 20 | 21 | sub build_file { 22 | my $self = shift; 23 | $self->installer =~ /MakeMaker/ ? 'Makefile.PL' : 'Build.PL'; 24 | } 25 | 26 | sub configure { 27 | my $self = shift; 28 | 29 | my @accepts = qw( MakeMaker MakeMaker::IncShareDir ModuleBuild ModuleBuildTiny ); 30 | my %accepts = map { $_ => 1 } @accepts; 31 | 32 | unless ($accepts{$self->installer}) { 33 | die sprintf("Unknown installer: '%s'. " . 34 | "Acceptable values are MakeMaker, ModuleBuild and ModuleBuildTiny\n", 35 | $self->installer); 36 | } 37 | 38 | my @dirty_files = ('dist.ini', 'Changes', 'META.json', 'README.md', 'LICENSE', $self->build_file); 39 | my @exclude_release = ('README.md'); 40 | 41 | $self->add_plugins( 42 | [ 'NameFromDirectory' ], 43 | 44 | # Make the git repo installable 45 | [ 'Git::GatherDir', { exclude_filename => [ $self->build_file, 'META.json', 'LICENSE', @exclude_release ] } ], 46 | [ 'CopyFilesFromBuild', { copy => [ 'META.json', 'LICENSE', $self->build_file ] } ], 47 | 48 | # should be after GatherDir 49 | # Equivalent to Module::Install's version_from, license_from and author_from 50 | [ 'VersionFromMainModule' ], 51 | [ 'LicenseFromModule', { override_author => 1 } ], 52 | 53 | [ 'ReversionOnRelease', { prompt => 1 } ], 54 | 55 | # after ReversionOnRelease for munge_files, before Git::Commit for after_release 56 | [ 'NextRelease', { format => '%v %{yyyy-MM-dd HH:mm:ss VVV}d' } ], 57 | 58 | [ 'Git::Check', { allow_dirty => \@dirty_files } ], 59 | 60 | # Make Github center and front 61 | [ 'GithubMeta', { issues => 1 } ], 62 | [ 'ReadmeAnyFromPod', { type => 'markdown', filename => 'README.md', location => 'root' } ], 63 | 64 | # Set no_index to sensible directories 65 | [ 'MetaNoIndex', { directory => [ qw( t xt inc share eg examples ) ] } ], 66 | 67 | # cpanfile -> META.json 68 | [ 'Prereqs::FromCPANfile' ], 69 | [ $self->installer ], 70 | [ 'MetaJSON' ], 71 | 72 | # experimental dist metadata 73 | [ 'StaticInstall', { mode => 'auto' } ], 74 | 75 | # Advertise Milla 76 | [ 'Milla::MetaGeneratedBy' ], 77 | 78 | # x_contributors for MetaCPAN 79 | [ 'Git::Contributors' ], 80 | 81 | # add Milla itself as a develop dependency 82 | [ 'Prereqs', { -phase => 'develop', 'Dist::Milla' => Dist::Milla->VERSION } ], 83 | 84 | # standard stuff 85 | [ 'PodSyntaxTests' ], 86 | [ 'MetaYAML' ], 87 | [ 'License' ], 88 | [ 'ReadmeAnyFromPod', 'ReadmeAnyFromPod/ReadmeTextInBuild' ], 89 | [ 'ExtraTests' ], 90 | [ 'ExecDir', { dir => 'script' } ], 91 | [ 'ShareDir' ], 92 | [ 'Manifest' ], 93 | [ 'ManifestSkip' ], 94 | 95 | [ 'CheckChangesHasContent' ], 96 | [ 'TestRelease' ], 97 | [ 'ConfirmRelease' ], 98 | [ $ENV{FAKE_RELEASE} ? 'FakeRelease' : 'UploadToCPAN' ], 99 | 100 | [ 'CopyFilesFromRelease', { match => '\.pm$' } ], 101 | [ 'Git::Commit', { 102 | commit_msg => '%v', 103 | allow_dirty => \@dirty_files, 104 | allow_dirty_match => '\.pm$', # .pm files copied back from Release 105 | } ], 106 | [ 'Git::Tag', { tag_format => '%v', tag_message => '' } ], 107 | [ 'Git::Push', { remotes_must_exist => 0 } ], 108 | 109 | ); 110 | } 111 | 112 | __PACKAGE__->meta->make_immutable; 113 | 1; 114 | 115 | __END__ 116 | 117 | =head1 NAME 118 | 119 | Dist::Zilla::PluginBundle::Milla - Dist::Zilla plugin defaults for Milla 120 | 121 | =head1 SYNOPSIS 122 | 123 | ; dist.ini 124 | name = Dist-Name 125 | [@Milla] 126 | installer = MakeMaker 127 | 128 | =head1 DESCRIPTION 129 | 130 | This is a Dist::Zilla plugin bundle that implements the opinionated build 131 | process of Milla. Roughly equivalent to: 132 | 133 | # TBD 134 | 135 | =head1 SEE ALSO 136 | 137 | L 138 | 139 | =cut 140 | 141 | -------------------------------------------------------------------------------- /META.json: -------------------------------------------------------------------------------- 1 | { 2 | "abstract" : "Distribution builder, Opinionated but Unobtrusive", 3 | "author" : [ 4 | "Tatsuhiko Miyagawa " 5 | ], 6 | "dynamic_config" : 0, 7 | "generated_by" : "Dist::Milla version v1.0.21, Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010", 8 | "license" : [ 9 | "perl_5" 10 | ], 11 | "meta-spec" : { 12 | "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", 13 | "version" : 2 14 | }, 15 | "name" : "Dist-Milla", 16 | "no_index" : { 17 | "directory" : [ 18 | "eg", 19 | "examples", 20 | "inc", 21 | "share", 22 | "t", 23 | "xt" 24 | ] 25 | }, 26 | "prereqs" : { 27 | "build" : { 28 | "requires" : { 29 | "Module::Build" : "0.3601" 30 | } 31 | }, 32 | "configure" : { 33 | "requires" : { 34 | "Module::Build" : "0.3601" 35 | } 36 | }, 37 | "develop" : { 38 | "requires" : { 39 | "Dist::Milla" : "v1.0.21", 40 | "Test::Pod" : "1.41" 41 | } 42 | }, 43 | "runtime" : { 44 | "requires" : { 45 | "Dist::Zilla" : "6", 46 | "Dist::Zilla::Plugin::CheckChangesHasContent" : "0", 47 | "Dist::Zilla::Plugin::ConfirmRelease" : "0", 48 | "Dist::Zilla::Plugin::CopyFilesFromBuild" : "0.163040", 49 | "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", 50 | "Dist::Zilla::Plugin::ExecDir" : "0", 51 | "Dist::Zilla::Plugin::ExtraTests" : "0", 52 | "Dist::Zilla::Plugin::Git::Contributors" : "0.009", 53 | "Dist::Zilla::Plugin::Git::GatherDir" : "0", 54 | "Dist::Zilla::Plugin::Git::Init" : "2.012", 55 | "Dist::Zilla::Plugin::GithubMeta" : "0", 56 | "Dist::Zilla::Plugin::License" : "0", 57 | "Dist::Zilla::Plugin::LicenseFromModule" : "0.05", 58 | "Dist::Zilla::Plugin::Manifest" : "0", 59 | "Dist::Zilla::Plugin::MetaJSON" : "0", 60 | "Dist::Zilla::Plugin::MetaYAML" : "0", 61 | "Dist::Zilla::Plugin::ModuleBuildTiny" : "0", 62 | "Dist::Zilla::Plugin::NameFromDirectory" : "0.04", 63 | "Dist::Zilla::Plugin::NextRelease" : "0", 64 | "Dist::Zilla::Plugin::PodSyntaxTests" : "0", 65 | "Dist::Zilla::Plugin::Prereqs::FromCPANfile" : "0.06", 66 | "Dist::Zilla::Plugin::ReadmeAnyFromPod" : "0.163250", 67 | "Dist::Zilla::Plugin::ReadmeFromPod" : "0.37", 68 | "Dist::Zilla::Plugin::ReversionOnRelease" : "0.04", 69 | "Dist::Zilla::Plugin::ShareDir" : "0", 70 | "Dist::Zilla::Plugin::StaticInstall" : "0", 71 | "Dist::Zilla::Plugin::Test::Compile" : "0", 72 | "Dist::Zilla::Plugin::TestRelease" : "0", 73 | "Dist::Zilla::Plugin::UploadToCPAN" : "0", 74 | "Dist::Zilla::Plugin::VersionFromMainModule" : "0", 75 | "Dist::Zilla::PluginBundle::Git" : "0", 76 | "Dist::Zilla::Role::PluginBundle::Config::Slicer" : "0", 77 | "Dist::Zilla::Role::PluginBundle::PluginRemover" : "0", 78 | "Module::CPANfile" : "0.9025", 79 | "perl" : "5.012" 80 | } 81 | }, 82 | "test" : { 83 | "requires" : { 84 | "Test::More" : "0.88" 85 | } 86 | } 87 | }, 88 | "release_status" : "stable", 89 | "resources" : { 90 | "bugtracker" : { 91 | "web" : "https://github.com/miyagawa/Dist-Milla/issues" 92 | }, 93 | "homepage" : "https://github.com/miyagawa/Dist-Milla", 94 | "repository" : { 95 | "type" : "git", 96 | "url" : "https://github.com/miyagawa/Dist-Milla.git", 97 | "web" : "https://github.com/miyagawa/Dist-Milla" 98 | } 99 | }, 100 | "version" : "v1.0.22", 101 | "x_contributors" : [ 102 | "Alex Efros ", 103 | "Curtis Brandt ", 104 | "Dan Book ", 105 | "Flavio Poletti ", 106 | "Helmut Wollmersdorfer ", 107 | "Karen Etheridge ", 108 | "mikegrb ", 109 | "Olivier Mengu\u00e9 ", 110 | "Shawn M Moore ", 111 | "Tatsuhiko Miyagawa " 112 | ], 113 | "x_generated_by_perl" : "v5.34.1", 114 | "x_serialization_backend" : "Cpanel::JSON::XS version 4.27", 115 | "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later", 116 | "x_static_install" : 0 117 | } 118 | 119 | -------------------------------------------------------------------------------- /Changes: -------------------------------------------------------------------------------- 1 | Revision history for Dist::Milla 2 | 3 | {{$NEXT}} 4 | 5 | v1.0.22 2023-07-05 12:37:17 PDT 6 | - Bump minimum perl requirement to 5.12 in new dists 7 | 8 | v1.0.21 2022-02-12 21:19:02 PST 9 | - Allow LICENSE file to be dirty 10 | 11 | v1.0.20 2018-04-22 21:10:49 CEST 12 | - Move StaticInstall plugin after installer 13 | 14 | v1.0.19 2018-04-22 18:11:01 CEST 15 | - Add StaticInstall plugin 16 | 17 | v1.0.18 2017-06-05 22:07:25 PDT 18 | - Switch VersionFromModule to VersionFromMainModule 19 | 20 | v1.0.17 2016-11-25 00:24:43 PST 21 | - Update Dist::Zilla requirement to version 6 #44 22 | 23 | v1.0.16 2016-05-08 11:49:31 PDT 24 | - Add VERSION to Dist::Zilla::PluginBundle::Milla #38 25 | - Use ReadmeAnyFromPod for POD #39 26 | 27 | v1.0.15 2015-03-31 16:25:26 PDT 28 | - Update documentation 29 | 30 | v1.0.14 2015-01-19 11:23:45 PST 31 | - switched from ContributorsFromGit to Git::Contributors 32 | 33 | v1.0.13 2015-01-18 22:11:26 PST 34 | - revert Git::Contributors because it doesn't build clean on `milla new` 35 | - add $VERSION to Dist::Milla::App so `milla version` would work correctly 36 | 37 | v1.0.12 2015-01-18 17:38:22 PST 38 | - switched from ContributorsFromGit to Git::Contributors 39 | 40 | v1.0.11 2015-01-18 11:15:10 PST 41 | - Minor documentation updates 42 | 43 | v1.0.10 2015-01-12 12:52:44 PST 44 | - Work around ReadmeFromPod update (#28) 45 | 46 | v1.0.9 2014-11-22 09:55:34 PST 47 | - bump minimum perl requirement 48 | 49 | v1.0.8 2014-09-10 17:18:28 PDT 50 | - Add PluginRemover role so you can easily remove plugin from Milla bundle. #27 51 | 52 | v1.0.7 2014-09-10 14:31:56 PDT 53 | - add Dist::Milla to the META as a develop dependency. #8 54 | 55 | v1.0.6 2014-09-10 14:11:08 PDT 56 | - bump LicenseFromModule 57 | 58 | v1.0.5 2014-05-08 08:35:25 PDT 59 | - Documentation fixes 60 | - Bump Test::More dependency 61 | 62 | v1.0.4 2013-08-25 20:23:42 PDT 63 | - Include generated LICENSE in the repository 64 | 65 | v1.0.3 2013-07-23 13:57:21 PDT 66 | - Allow MakeMaker::IncShareDir 67 | 68 | v1.0.2 2013-04-21 08:47:50 CST 69 | - Added ManifestSkip by default 70 | 71 | v1.0.1 2013-04-14 17:21:54 JST 72 | - LicenseFromModule: author information is now peoprely generated out of .pm 73 | - Prereq::FromCPANfile: support 'feature' DSL encoded into META 74 | 75 | v1.0.0 2013-04-06 21:22:44 PDT 76 | - This be 1.0.0 77 | 78 | v0.9.7 2013-04-02 22:54:20 PDT 79 | - Bump LicenseFromModule and use override_author hack 80 | 81 | v0.9.6 2013-04-02 11:17:59 PDT 82 | - remove Test::Compile 83 | 84 | v0.9.5 2013-04-01 20:41:29 PDT 85 | - Bump ReversionOnRelease dependency 86 | 87 | v0.9.4 2013-04-01 17:25:29 PDT 88 | - Added ContributorsFromGit 89 | 90 | v0.9.3 2013-03-30 15:14:03 PDT 91 | - Add MetaNoIndex to add sensible directories to no_index in META 92 | 93 | v0.9.2 2013-03-29 23:40:11 PDT 94 | - bump Dist::Zilla dep to 4.300032 95 | 96 | v0.9.1 2013-03-27 17:55:31 PDT 97 | - Bump Dist::Zilla dependency (ranguard) 98 | - Minor fix to documentation 99 | 100 | v0.9.0 2013-03-27 01:36:14 PDT 101 | - Initial release on CPAN 102 | 103 | v0.1.18 2013-03-27 00:22:00 PDT 104 | - Run the initial build to get build & META in git 105 | - Add Dist::Zilla version to generated_by 106 | - Bump Git::Init dependency 107 | 108 | v0.1.17 2013-03-26 15:58:26 PDT 109 | - Advertize Milla in generated_by META data 110 | 111 | v0.1.16 2013-03-26 12:33:57 PDT 112 | - Extract ReversionOnRelease 113 | - Up Perl dependency to 5.8.5 114 | 115 | v0.1.15 2013-03-26 10:43:04 PDT 116 | - Properly support subclassing Dist::Zilla::App (rjbs++) 117 | 118 | v0.1.14 2013-03-26 02:30:15 PDT 119 | - Add .gitignore and .travis.yml in Minting 120 | 121 | v0.1.13 2013-03-26 02:11:32 PDT 122 | - Add milla command wrapper for new and install 123 | 124 | v0.1.12 2013-03-25 14:17:06 PDT 125 | - Internal 126 | 127 | v0.1.11 2013-03-25 01:28:53 PDT 128 | - Keep the empty line in reversion 129 | 130 | v0.1.10 2013-03-24 23:30:00 PDT 131 | - Added 'script' dir to ExecDir 132 | 133 | v0.1.9 2013-03-24 23:00:35 PDT 134 | - Added LicenseFromModule 135 | - Added a bit more verbose logging in ReversionOnRelease 136 | 137 | v0.1.8 2013-03-24 17:29:35 PDT 138 | - Allow README to be dirty 139 | - Added prompt to ReversionOnRelease 140 | 141 | v0.1.7 2013-03-23 23:13:36 PDT 142 | - Separate NameFromDirectory as a CPAN module 143 | 144 | v0.1.6 2013-03-23 20:46:35 PDT 145 | - Change header for the next release 146 | 147 | v0.1.5 2013-03-23 20:33:34 America/Los_Angeles 148 | - Support FAKE_RELEASE environment variable 149 | - Add installer option 150 | 151 | v0.1.4 2013-03-22 17:04:58 America/Los_Angeles 152 | - Internal 153 | 154 | v0.1.3 2013-03-22 16:19:50 America/Los_Angeles 155 | - Internal 156 | 157 | v0.1.2 2013-03-22 16:03:24 America/Los_Angeles 158 | - Internal 159 | 160 | v0.1.1 2013-03-22 15:56:28 America/Los_Angeles 161 | - Debugging 162 | 163 | v0.1.0 2013-03-22 15:47:25 America/Los_Angeles 164 | - original version 165 | -------------------------------------------------------------------------------- /lib/Dist/Milla/Tutorial.pod: -------------------------------------------------------------------------------- 1 | =head1 NAME 2 | 3 | Dist::Milla::Tutorial - Milla HOW TO 4 | 5 | =head1 WORKFLOW 6 | 7 | See also L 9 | explaining how to setup and create a new distribution with Milla. 10 | 11 | =head2 Setup 12 | 13 | Install Milla and setup your profile. 14 | 15 | > cpanm Dist::Milla 16 | > milla setup 17 | 18 | Setup command will ask you a simple question to make a basic 19 | profile. If you already have set up C before, this is common and 20 | you can skip the process. 21 | 22 | =head2 Making a new distribution 23 | 24 | Now it's time to make a new distribution. 25 | 26 | > milla new Dist-Name 27 | > cd Dist-Name 28 | 29 | At this point, you will have a really simple C directory 30 | that contains your module file with as minimum boilerplate as 31 | possible. 32 | 33 | It is recommended to track your repository under git as soon as 34 | possible, even before releasing to CPAN. 35 | 36 | # git is already initialized and files are added for you 37 | > git commit -m "initial commit" 38 | 39 | Now start writing your code, edit the docs, tests and manage CPAN 40 | dependencies with L. 41 | 42 | > $EDITOR lib/Dist/Name.pm t/dist-name.t cpanfile 43 | 44 | You can test your code with a simple C. 45 | 46 | For the first time build only, you can make a test build to get some 47 | boilerplate you want to keep in the git repository so that your github 48 | repository looks great with README, as well as installable from git 49 | using C or testable with C. 50 | 51 | > milla build 52 | > git add Build.PL META.json README.md && git commit -m "git stuff" 53 | 54 | =head2 Making the first release 55 | 56 | When you get confident and it's about time to ship to CPAN, use the 57 | test and release command. Before doing so, make sure your git 58 | directory is not dirty i.e. all changes are committed. 59 | 60 | > git commit -a -m "Done initial version" 61 | 62 | Milla assumes you have a git remote setup so that you can push all 63 | your changes to. I recommend you to use either 64 | L or L to create a new 65 | github repository. 66 | 67 | # Use hub rubygem 68 | > hub create 69 | 70 | # Use App::ph 71 | > ph import 72 | 73 | Now, make sure you have C file ready and have a new entry 74 | under C<{{$NEXT}}>, which will be expanded to the next version of your 75 | module. 76 | 77 | > $EDITOR Changes 78 | > milla test 79 | > milla release 80 | 81 | And your first release is done. The release is tagged on git and all 82 | the changes atomatically made are committed to git as well. 83 | 84 | If this is your first conversion to Milla and want to make sure you're 85 | not going to mess CPAN with a bad archive when something goes wrong, 86 | you can run the release command with C environment 87 | variable. This will run all the other release process, except the 88 | UploadToCPAN step. 89 | 90 | > FAKE_RELEASE=1 milla release 91 | 92 | Wait for PAUSE processing it and your module showing up on MetaCPAN in 93 | a few minutes. Congratulations! 94 | 95 | =head2 Making a maintainance release 96 | 97 | You have new features, bugs, pull requests and get ready to make a next 98 | version of your module. Great, making a new release is equally easy. 99 | 100 | First, make sure all your code has been committed to git and there are 101 | no dirty files in the working directory. 102 | 103 | Then make sure to edit C file and contain entries for the 104 | next release under C<{{$NEXT}}>. You don't need to commit the change 105 | to the C file, yet. 106 | 107 | Now, make a release! 108 | 109 | > milla test 110 | > milla release 111 | 112 | The release command will automatically bump the version for you - if 113 | you have C<0.10>, the next version will be C<0.11> by default, but you 114 | will be prompted to confirm that version in case you need a major 115 | bump. 116 | 117 | This will update C, C and bump C<$VERSION> in your 118 | main module. These changes made by Milla will be automatically 119 | committed, tagged and pushed to the remote. 120 | 121 | =head1 MIGRATING 122 | 123 | This section describes how to migrate your current authoring process 124 | to Milla. 125 | 126 | =head2 Automatic migration 127 | 128 | Sister project L provides a wonderful conversion tool to 129 | migrate your existing distribution to Milla, which happens to be 130 | compatible to Milla as well. 131 | 132 | As an author of Milla, I use Minilla's migrate command all the time to 133 | get the most of conversion done. 134 | 135 | To run Minilla migration tool, install L from CPAN and run 136 | the C command in the project root. 137 | 138 | > cpanm Minilla 139 | > minil migrate && git rm -f minil.toml 140 | 141 | The command will output the migration process, and C all the 142 | changed files for you. Once the migrate command is complete, all you 143 | have to do is to create C file, and run the build command. 144 | 145 | > echo "[@Milla]" > dist.ini 146 | > milla build 147 | 148 | If one of the command has failed, you might need to reset to the 149 | original state and run the manual migration. Read on to see how to do 150 | that. 151 | 152 | =head2 Manually migrating from other build tools 153 | 154 | =head3 Module Dependencies to cpanfile 155 | 156 | First, move the prereq declaration from C or C 157 | to C. 158 | 159 | The easiest way to convert existing dependencies to cpanfile is to use 160 | the command line tool C, which is installed with 161 | L. Run the configuration with C for the 162 | one last time, then run the C command: 163 | 164 | > perl Makefile.PL 165 | > mymeta-cpanfile --no-configure 166 | requires 'DBI', '1.000'; 167 | 168 | on test => sub { 169 | requires 'Test::More', '0.86'; 170 | } 171 | 172 | ... 173 | 174 | You can redirect the output to C if you like. It is 175 | important to pass C<--no-configure> option here, since otherwise 176 | modules like ExtUtils::MakeMaker will be included. It is not required 177 | with Milla setup, since Milla knows which configuration tool 178 | (installer) to use and include them in META files upon the 179 | releases. You can leave that out from the C. 180 | 181 | If you decide to manually construct a new cpanfile, the format is mostly 182 | compatible to L's requirement DSL. 183 | 184 | # Makefile.PL 185 | test_requires 'Test::More', 0.90; 186 | requires 'Plack', '1.000'; 187 | 188 | becomes: 189 | 190 | # cpanfile 191 | test_requires 'Test::More', 0.90; 192 | requires 'Plack', '1.000'; 193 | 194 | which is exactly the same. If you use L or 195 | L, that will be more manual process, but 196 | basically the same thing. See L for the available syntax. 197 | 198 | =head3 Remove boilerplate 199 | 200 | Next, remove unnecessary boilerplate files. 201 | 202 | > git rm {Makefile,Build}.PL MANIFEST MANIFEST.SKIP README .shipit 203 | 204 | =head3 Create a new ini and edit configurations 205 | 206 | Next, create a new C with the following two lines: 207 | 208 | name = Dist-Name 209 | [@Milla] 210 | 211 | the C line is optional. 212 | 213 | If your work directory is named C, Milla will be able to 214 | figure out that is your distribution name, so you can omit that line. 215 | 216 | Next, Edit C<.gitignore> and add the following lines: 217 | 218 | /Dist-Name-* 219 | /.build 220 | !META.json 221 | 222 | You're almost done, and your directory will look like: 223 | 224 | cpanfile 225 | dist.ini 226 | lib/Dist/Name.pm 227 | t/... 228 | 229 | C the newly created files and commit it. 230 | 231 | =head3 Make a new build 232 | 233 | Now you're ready to make the first build. 234 | 235 | > milla build 236 | 237 | and if it was successful, you get a build in a directory called 238 | C under your current directory. They can be later 239 | removed with C command. 240 | 241 | Also, new C, C and C are added in your 242 | working directory for git-friendliness. C them and commit it. 243 | 244 | > git add Build.PL META.json README.md && git commit -m "git stuff" 245 | 246 | Now you're ready to roll a new release with Milla. Before doing so, 247 | convert your C file format a little bit, and make sure you 248 | have a following header in the top: 249 | 250 | {{$NEXT}} 251 | - Change log entry for the next version 252 | 253 | The C<{{$NEXT}}> is a template variable that gets replaced with the 254 | version and date string, when you make a next release. This is almost 255 | the I change you're required to make in your code base. 256 | 257 | Now, run the release command: 258 | 259 | > milla release 260 | 261 | to make a new release, in the same way described above for a new Milla 262 | setup. You can set C environment variable if this is 263 | your first conversion and want to double check what happens, before 264 | uploading to CPAN. 265 | 266 | When this is not your first release, the version number gets 267 | automatically bumped by Milla, but you will be prompted if that is 268 | exactly the version you want, and if you want a major version up, you 269 | can specify to do so. 270 | 271 | =head1 AUTHOR 272 | 273 | Tatsuhiko Miyagawa 274 | 275 | =head1 SEE ALSO 276 | 277 | L 278 | 279 | =cut 280 | -------------------------------------------------------------------------------- /lib/Dist/Milla.pm: -------------------------------------------------------------------------------- 1 | package Dist::Milla; 2 | 3 | use strict; 4 | use version; our $VERSION = version->declare('v1.0.22'); 5 | 6 | 1; 7 | __END__ 8 | 9 | =encoding utf-8 10 | 11 | =head1 NAME 12 | 13 | Dist::Milla - Distribution builder, Opinionated but Unobtrusive 14 | 15 | =head1 SYNOPSIS 16 | 17 | > milla new Dist-Name 18 | > cd Dist-Name 19 | 20 | > milla build 21 | > milla release 22 | 23 | =head1 DESCRIPTION 24 | 25 | B. It is a collection of 26 | L plugin bundle, minting profile and a command line 27 | wrapper. It is designed around the "Convention over Configuration" 28 | philosophy (Opinionated), and by default doesn't rewrite module files 29 | nor requires you to change your workflow at all (Unobtrusive). 30 | 31 | Experienced CPAN authors who know how to write CPAN distributions can 32 | keep writing the code like before, but can remove lots of cruft, then 33 | replace L and L with L and Milla 34 | profile for authoring, while you don't need to I anything other 35 | than a shiny new L (optional), and a simple C 36 | saying: 37 | 38 | [@Milla] 39 | 40 | =head1 CONVENTIONS 41 | 42 | Milla is opinionated. Milla has a slightly bold assumption and 43 | convention like the followings, which are almost compatible to the 44 | sister project L. 45 | 46 | =over 4 47 | 48 | =item Your module is Pure Perl, and files are stored in C 49 | 50 | =item Your executable file is in C