• Stars
    star
    97
  • Rank 348,505 (Top 7 %)
  • Language
    Perl
  • License
    Other
  • Created over 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Authorizing tool for CPAN modules

Actions Status MetaCPAN Release

NAME

Minilla - CPAN module authoring tool

SYNOPSIS

minil new     - Create a new dist
minil test    - Run test cases
minil dist    - Make your dist tarball
minil install - Install your dist
minil release - Release your dist to CPAN
minil run     - Run arbitrary commands against build dir

DESCRIPTION

Minilla is a CPAN module authoring tool. Minilla provides minil command for authorizing a CPAN distribution.

(M::I - inc) + shipit + (dzil - plugins)

CONVENTION

As stated above, Minilla is opinionated. Minilla has a bold assumption and convention like the followings, which are almost compatible to the sister project Dist::Milla.

  • Your modules are written in Pure Perl and are located in lib/.
  • Your executable files are in script/ directory, if any
  • Your module is maintained with Git, git ls-files matches with what you will release and your remote is named origin
  • Your module has a static list of prerequisites that can be described in cpanfile
  • Your module has a Changes file
  • Your module requires at least perl 5.6.

GETTING STARTED

# First time only
% cpanm --with-recommends Minilla
# Minilla has only a few deps. It should be very quick

# Make a new distribution
% minil new Dist-Name
% cd Dist-Name/

# Git commit
% git commit -m "initial commit"

# Hack your code!
% $EDITOR lib/Dist/Name.pm t/dist-name.t cpanfile

# Done? Test and release it!
% minil release

It's that easy.

You already have distributions with Module::Install, Module::Build, Dist::Zilla or ShipIt? Migrating is also trivial. See "MIGRATING" in Minilla::Tutorial for more details.

WHY MINILLA?

Repository managed by Minilla is git install ready.

The repository created and managed by Minilla is git install ready. You can install the library by cpanm git://....

Of course, you can install Minilla from cpanm git://github.com/tokuhirom/Minilla.git.

Minilla is built on small libraries.

Minilla is built on only few small libraries. You can install Minilla without a huge list of dependencies to heavy modules.

And, what is Minilla?

Minilla is a Kaiju (Japanese giant monster) from the Godzilla series of films and is the first of several young Godzillas.
https://en.wikipedia.org/wiki/Minilla

Minilla's release process

Minilla's release process is the following.

CheckUntrackedFiles

Checking git's untracked files. If there's untracked files, minilla will abort.

CheckOrigin

This step will run the `git remote`. If there's no remote, minilla will abort.

CheckReleaseBranch

Checking git's current branch is `release.branch` key in minil.toml. If no match, minilla will abort.

BumpVersion

Minilla will show 'Next Release?' prompt. You can input next version number.

After that, minilla rewrites version numbers in **/*.pm, **/*.pl, and a script file contains perl-ish shebang.

CheckChanges

You need to write Changes file. Your module's users need to know the difference between versions.

Minilla's Changes file includes `{{$NEXT}}` next version indicator. You should put update informations after that.

RegenerateFiles

In this step, minilla will regenerate META.json, README.md and (Makefile.PL|Build.PL).

RunHooks

This step runs commands listed on `release.hooks` key in minil.toml.

DistTest

This script runs test cases in clean working directory with $ENV{RELEASE_TESTING} = 1.

MakeDist

Make distribution tar ball.

UploadToCPAN

Upload your module to CPAN.

RewriteChanges

Rewrite Changes file. Minilla replaces {{$NEXT}} with released version number and current date & time. And put {{$NEXT}} on the first line.

Commit

Commit current directory with automatically generated commit message from Changes file. And push it to origin.

Tag

Create new git tag and push it to origin.

CONFIGURATION

Minilla uses Convention over Configuration.

But, you can write configurations to minil.toml file in TOML format. Minilla reads the minil.toml file in the root directory of your project.

  • name

    You can write 'name' instead of automatically detecting project name out of the directory name.

  • module_maker

    Minilla supports three module building mechanisms. Module::Build::Tiny is the default one and Module::Build or ExtUtils::MakeMaker are the alternatives. See also FAQ section in this document.

      module_maker="ModuleBuild"
    
  • readme_from

      readme_from="lib/My/Foo.pod"
    

    You can specify the file to generate the README.md. This is a main module path by default.

  • tag_format

      tag_format="perl/%v"
    

    format of the tag to apply. Defaults to %v. %v will replace with the distribution version.

  • abstract_from

      abstract_from="lib/My/Foo.pod"
    

    Grab abstract information from the file contains pod.

  • authors_from

      authors_from="lib/My/Foo.pod"
    

    Grab authors information from the file contains pod.

  • authority

      authority = "cpan:TOKUHIROM"
    

    Set x_authority attribute to META. See https://jawnsy.wordpress.com/2011/02/20/what-is-x_authority/ for more details. Note that now PAUSE itself copies the permissions from the "main module" to any new modules entering the index for the first time, so you don't need to set this attribute anymore.

  • allow_pureperl

      allow_pureperl=1
    

    A boolean indicating the module is still functional without its XS parts. When an XS module is build with --pureperl_only, it will otherwise fail.

    It affects to Module::Build 0.4005+ only.

  • no_github_issues

      no_github_issues=true
    

    Minilla sets bugtracker to github/GitLab's issue tracker by default. But if you want to use RT, you can set this variable.

  • no_index

      [no_index]
      directory=['t', 'xt', 'tools']
    

    Minilla sets META.json's no_index as directory => ['t', 'xt', 'inc', 'share', 'eg', 'examples', 'author', 'builder'] by default. But if you want to change them, you can set this section variable. If this section is set, specified variables are only used, in fact default settings are not merged.

  • c_source

      c_source = ['src']
    

    A directory which contains C source files that the rest of the build may depend on. Any ".c" files in the directory will be compiled to object files. The directory will be added to the search path during the compilation and linking phases of any C or XS files.

  • script_files

      script_files = ['bin/foo', 'script/*']
    

    Minilla sets install script files as ['script/*', 'bin/*'] by default.

    (Note. This option doesn't affect anything if you are using ModuleBuildTiny or ExtUtilsMakeMaker, for now. If you are using ModuleBuildTiny, you MUST put scripts in script/ directory.)

  • tap_harness_args(EXPERIMENTAL)

      [tap_harness_args]
      jobs=19
    

    This parameters pass to TAP::Harness when running tests. See the TAP::Harness documentation for details.

  • license

      license="artistic_2"
    

    You can specify your favorite license on minil.toml. The license key is same as CPAN Meta spec 2.0. See CPAN::Meta::Spec.

  • badges

      badges = ['travis-ci.com', 'travis-ci.org', 'circleci', 'appveyor', 'coveralls', 'codecov', 'gitter', 'metacpan', 'kritika', 'github-actions/$workflow_file', 'gitlab-pipeline', 'gitlab-coverage']
    

    Embed badges image (e.g. Travis-CI) to README.md. It ought to be array and each elements must be service name. Now, supported services are 'travis-ci.com', 'travis-ci.org', 'circleci', 'appveyor', 'coveralls', 'codecov', 'gitter', 'metacpan', 'kritika' 'github-actions', 'gitlab-pipeline' and 'gitlab-coverage'.

    You can send additional parameters as required by your CI provider by including a query string along with your service name: e.g. travis?token=[YOUR_TOKEN_GOES_HERE]&branch=dev

  • PL_files

    Specify the PL files.

      [PL_files]
      lib/Foo/Bar.pm.PL="lib/Foo/Bar.pm"
    

    This option is not supported by Minilla::ModuleMaker::ModuleBuildTiny.

    Note. MBTiny executes *.PL files by default.

  • build.build_class

    Specify a custom Module::Build subclass.

      [build]
      build_class = "builder::MyBuilder"
    
  • XSUtil.needs_compiler_c99

      [XSUtil]
      needs_compiler_c99 = 1
    

    You can specify needs_compiler_c99 parameter of Module::Build::XSUtil.

  • XSUtil.needs_compiler_cpp

      [XSUtil]
      needs_compiler_cpp = 1
    

    You can specify needs_compiler_cpp parameter of Module::Build::XSUtil.

  • XSUtil.generate_ppport_h

      [XSUtil]
      generate_ppport_h = 1
    

    You can specify generate_ppport_h parameter of Module::Build::XSUtil.

  • XSUtil.generate_xshelper_h

      [XSUtil]
      generate_xshelper_h = 1
    

    You can specify generate_xshelper_h parameter of Module::Build::XSUtil.

  • XSUtil.cc_warnings

      [XSUtil]
      cc_warnings = 1
    

    You can specify cc_warnings parameter of Module::Build::XSUtil.

  • FileGatherer.exclude_match

      [FileGatherer]
      exclude_match = ['^author_tools/.*']
    

    Nothing by default. To exclude certain files from being gathered into dist, use the exclude_match option. Files matching the patterns are not gathered.

  • FileGatherer.include_dotfiles

      [FileGatherer]
      include_dotfiles = false
    

    By default, files will not be included in dist if they begin with a dot. This goes both for files and for directories.

    In almost all cases, the default value (false) is correct.

  • release.pause_config

      [release]
      pause_config = "/path/to/some/.pause"
    

    By setting this value to another PAUSE configuration file (see "CONFIGURATION" in cpan-upload for the details), it is possible to use another PAUSE server (or anything good enough to mimick its upload process) for the release step.

    To do so, simply add a upload_uri entry in your file to the alternate PAUSE server, i.e :

      upload_uri http://127.0.0.1:5000/pause/authenquery
    

    If you instantly launch your origin upload server as DarkPAN, See OrePAN2::Server.

  • release.do_not_upload_to_cpan

      [release]
      do_not_upload_to_cpan=true
    

    This variable disables CPAN upload feature.

  • release.hooks

      [release]
      hooks = [
          "COMMAND1",
          "COMMAND2"
      ]
    

    Commands that are specified by this option will be executed when releasing. If result of commands is not successful, it will abort.

  • release.branch

      [release]
      branch = "main"
    

    If this value does not match the current branch, it will abort.

  • unsupported.os

      [unsupported]
      os = [
          "MSWin32",
          "darwin"
      ]
    

    By setting this value to add unsupported OS checks for (Build.PL|Makefile.PL).

  • ReleaseTest.MinimumVersion

      [ReleaseTest]
      MinimumVersion = false
    

    If you set this key false, Minilla will not generate 'xt/minilla/minimum_version.t'.

  • requires_external_bin

      requires_external_bin=['tar']
    

    The requires_external_bin command takes the name of a system command or program. Build fail if the command does not exist.

  • markdown_maker

      markdown_maker = "Pod::Markdown::Github"
    

    Use a different module to generate README.md from your pod. This module must subclass Pod::Markdown.

  • Metadata

      [Metadata]
      x_deprecated = 1
    

    Add arbitrary keys to META.json/META.yml.

  • static_install

      static_install = "auto"
    

    If static_install = "auto" (or nothing is specified at all), then minil tries to detect whether distributions are ready for static install or not, and set x_static_install in META files accordingly. You can also set static_install = 0/1 explicitly; then minil will respect it.

    For static install itself, please refer to https://github.com/Perl-Toolchain-Gang/cpan-static.

FAQ

  • How can I manage contributors section?

    Minilla aggregates contributors list from git log --format="%aN <%aE>" | sort | uniq.

    You can merge accounts by .mailmap file. See https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html

  • Why don't you provide plug-in support?

    If you want a pluggable tool, it already exists: It's called Dist::Zilla :P If you like Minilla's behavior but you really want something pluggable, you can use Dist::Milla, Minilla's sister project. Dist::Milla's behavior is almost identical to that of Minilla.

  • Why does minil only support git?

    I think git is a best VC for CPAN modules, for now.

    If you want to use another version control system, you can probably use Dist::Milla.

  • And why...

    Yes. You can use Dist::Milla.

  • Should I add (META.json|Build.PL) to repository?

    Yes. You need to add it to make your git repo installable via cpanm.

  • How do I manage ppport.h?

    Is there a reason to remove ppport.h from repo?

  • How can I install script files?

    Your executables must be in script/ directory.

  • How to switch from Module::Install/Module::Build/Dist::Zilla?

    You can use experimental `minil migrate` sub-command. See Minilla::CLI::Migrate for more details.

  • How should I manage the files you do not want to upload to CPAN?

    Please use FileGatherer.exclude_match for ignoring files to upload tar ball.

    You can use MANIFEST.SKIP file for ignoring files. ref. ExtUtils::Manifest.

  • How do I use Module::Build::Tiny with Minilla?

    Minilla supports Module::Build::Tiny and uses it as a default installer since v1.0.0.

    If you want to migrate an existing project created before Minilla v1.0, you need to rewrite minil.toml file. You need to add the following line:

      module_maker="ModuleBuildTiny"
    
  • How do I use Module::Build with Minilla?

    If you want to create new project with Module::Build, run the command as following.

      % minil new -p ModuleBuild My::Awesome::Module
    
  • How do I use ExtUtils::MakeMaker with Minilla?

    Minilla v2.1.0+ supports EUMM(EXPERIMENTAL).

    You need to rewrite minil.toml file and add the following line:

      module_maker="ExtUtilsMakeMaker"
    

    (There is no profile, yet. Patches welcome.)

    I don't suggest to use this module... But you can use this option for maintaining primitive modules like Test::TCP.

  • Ho do I support Perl 5.6?

    EUMM can run on Perl 5.6. Write following statement in your minil.toml file.

      module_maker="ExtUtilsMakeMaker"
    

bash/zsh completion

Minilla provides bash and zsh completion files under contrib/ directory.

AUTHORS

Tokuhiro Matsuno < [email protected] >

Tatsuhiko Miyagawa

THANKS TO

RJBS, the author of Dist::Zilla. Dist::Zilla points CPAN authorizing tool.

SEE ALSO

LICENSE

Copyright (C) Tokuhiro Matsuno

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

More Repositories

1

plenv

Perl binary manager
Shell
500
star
2

Amon

yet another web application framework
Perl
160
star
3

java-handbook

137
star
4

git-xlsx-textconv

Go
132
star
5

akaza

Yet another Japanese IME for IBus/Linux
Rust
127
star
6

Furl

pretty fast http client library for perl5
Perl
103
star
7

Perl-Build

Perl
79
star
8

spring-vue-sample

Java
71
star
9

p6-Crust

PSGI library stack for Perl6
Raku
66
star
10

node-perl

Node perl wrapper
C++
63
star
11

toydi

Java
63
star
12

cpan-outdated

detect outdated CPAN modules
Perl
52
star
13

tora

Tora! Tora! Tora!
Perl
51
star
14

avans

Tiny thin web application framework for Java 8
Java
50
star
15

js-xlsx-demo

JavaScript
50
star
16

SQL-Maker

Perl
47
star
17

jawiki-kana-kanji-dict

Generate SKK/MeCab dictionary from Wikipedia(Japanese edition)
Python
40
star
18

node-mruby

C++
40
star
19

Daiku

Yet another build tool on Perl5
Perl
38
star
20

teng-handbook

Perl
38
star
21

mobirc

IRC Gateway for MobilePhone/iPhone/PC
JavaScript
33
star
22

Test-TCP

Test::TCP for perl
Perl
33
star
23

jsref

JavaScript
33
star
24

re2c-lemon-tutorial

C++
32
star
25

p5-router-simple

simple http router
Perl
32
star
26

tinyorm

Tiny O/R mapper for Java
Java
29
star
27

p5-psgiref

(DEPRECATED)just a prototype!
Perl
28
star
28

Web-Query

Perl
27
star
29

OrePAN

Perl
26
star
30

obsidian-2hop-links-plugin

TypeScript
26
star
31

optimize-perl-doc

how to optimize your perl code?
Perl
26
star
32

frepan

freshness mirror of cpan viewer
JavaScript
25
star
33

strftime-js

JavaScript
25
star
34

menta

General extlib/ for CGI applications.
Perl
25
star
35

PJP

Perl
24
star
36

micro_dispatcher.js

JavaScript
22
star
37

data-model-tutorial

the tutorial documents for Data::Model
Perl
22
star
38

OrePAN2

Perl
22
star
39

hoshipad

JavaScript
22
star
40

FormValidator-Lite

very lite and fast validation library for perl
Perl
21
star
41

go-examples

my Golang examples repo.
Go
21
star
42

THWebViewController

Minimalistic WebViewController
Objective-C
20
star
43

go-hsperfdata

Quite fast jps/jstat
Go
20
star
44

Test-Pretty

Perl
20
star
45

p5-http-server-fast

(DEPRECATED)
C++
18
star
46

p6-HTTP-Server-Tiny

Web application server for Perl6
Perl 6
18
star
47

gearman-stat.psgi

Display gearman stats.
18
star
48

visualwidth-js

JavaScript
18
star
49

Router-Boom

Perl
18
star
50

obsidian-pomodoro-plugin

TypeScript
17
star
51

Archer

Perl
17
star
52

nanobench

Tiny benchmarking framework for Java 7+
Java
17
star
53

nanowww

C++ lightweight, fast, portable HTTP client library
Perl
17
star
54

mouse

Moose minus the antlers
Perl
16
star
55

www-mobilecarrierjp

WWW::MobileCarrierJP
Perl
16
star
56

http-session

http session management library for perl
Perl
16
star
57

HTML-TreeBuilder-LibXML

drop-in-replacement for HTML::TreeBuilder::XPath
Perl
16
star
58

Tiffany

Template-For-All, Generic interface for perl template engines.
Perl
16
star
59

DBIx-Inspector

Perl
16
star
60

w3m

my private repo of w3m
C
15
star
61

File-Zglob

Perl
15
star
62

madeye

simple infrastructure monitoring tool
Perl
15
star
63

Smart-Args

the new args.pm!
Perl
15
star
64

Test-Kantan

Perl
14
star
65

Caroline

Yet another line editing library for Perl5
Perl
14
star
66

p5-net-drizzle

libdrizzle bindings for perl5
C
14
star
67

perl-echo-servers

C
14
star
68

gearman-starter.pl

bootstrap script for gearman worker
Perl
13
star
69

MySQL-BinLog

Perl
13
star
70

obsidian-stopwatch-plugin

TypeScript
13
star
71

MetaCPANExplorer

CSS
13
star
72

node-tcc

C++
13
star
73

HTML-Pictogram-MobileJp

[emoji:1] ใฟใŸใ„ใชใฎใ‚’ๅ‡ฆ็†ใงใใ‚‹ไบบ
Perl
13
star
74

App-watcher

Perl
13
star
75

tinyvalidator

Tiny validation library for Java 8
Java
13
star
76

Text-Markdown-Hoedown

Perl
13
star
77

java-samples

Java
12
star
78

nanotap

yet another tap header library
HTML
12
star
79

App-scan_prereqs_cpanfile

Scan prerequisite modules and generate CPANfile
Perl
12
star
80

MojaMoja

(PoC)yet another sinatra-ish framework built on CPAN modules
Perl
12
star
81

Test-SharedFork

Test::SharedFork
Perl
12
star
82

p5-cgi-emulate-psgi

CGI::Emulate::PSGI
Perl
11
star
83

p5-anyevent-mprpc

MessagePack RPC component for AnyEvent!
Perl
11
star
84

mRuby.pm

Perl
11
star
85

devel-bindpp

Devel::BindPP makes writing perl extension easily
C++
11
star
86

Test-Power

Perl
11
star
87

regexp-trie

Regexp::Trie for Java7
Java
11
star
88

Sub-Retry

Perl
11
star
89

blosxom.psgi

cho45 style blosxom thing for psgi. see http://coderepos.org/share/wiki/BlosxomClones
10
star
90

cgi-extlib-perl

General extlib/ for Perl CGI applications.
Perl
10
star
91

p5-module-install-forc

M::I extension for standalone C program/library
Perl
10
star
92

DBIx-Kohada

Perl
10
star
93

Amon2-Lite

Perl
10
star
94

autolink.js

JavaScript
10
star
95

Module-Spy

Perl
10
star
96

p6-WebSocket

Perl 6
10
star
97

Harriet

Perl
10
star
98

Cache-KyotoTycoon

KyotoTycoon client library for Perl5
Perl
10
star
99

mindcheese

Editable mindmap library written in TypeScript
TypeScript
10
star
100

Perl-Lexer

C
10
star