cpan6 - a tool to assist in creating and sharing CPAN modules
- SYNOPSIS
- DESCRIPTION
- COMMANDS
- bootstrap config [ option ] [ value ]
- [ --dir=/usr/share/man ] bootstrap man [ page ]
- bump [ patch | minor | major ]
- [ --no-files ] [ --no-meta ] clean < path >
- [ --no-install ] depend < modules … >
- dist < paths … >
- help
- [ --no-git ] [ --no-travis ] new [ name ]
- [ --no-bump ] push < paths … >
- test
- touch bin <name>
- touch class <class>
- touch resource <resource>
- touch test <test>
- touch unit <unit>
- [ --pause-id=<id> ] [ --pause-password=<password> ] upload < dists … >
- OPTIONS
- EXAMPLES
- BUGS
- AUTHOR
- COPYRIGHT
The cpan6
program is a Perl 6 module which is aimed to help developers in
creating new modules. It should be able to assist from the very start through
the end of actually publishing a module on PAUSE.
It can create the skeleton of a new module project, add more files later on
(and update your META6.json
accordingly), package it up to a distributable
archive and upload the archive to PAUSE.
Update a given configuration option. If no option is supplied, all configuration options are presented in alphabetical order.
Attempt to bootstrap the man pages into the given --dir
. Optionally takes a
page
, which will limit to attempt installation for the given page only.
Bumps the module’s patch, minor or major version. If no bump type is supplied,
it will be prompted. If a .git
repository is found, a commit and a tag will
be created as well.
Clean up files not referenced in the META6.json
, and remove entries from
META6.json
which have no corresponding file. The --no-files
flag will not
remove files without a corresponding entry in the META6.json
, while the
--no-meta
won’t touch your META6.json
.
Add a dependency to one or more modules. Will attempt to install the module
locally as well, unless --no-install
is supplied.
Create a distribution from a module in a given path. Multiple paths can be supplied to create multiple dists in one go. If no path is supplied, the current directory will be used.
Create a new Perl 6 module skeleton. A name can be supplied as argument, but
will be prompted for if not supplied. Options for git and travis are available,
and enabled by default. To disable these, use --no-git
or --no-travis
,
respectively.
Pushes one or more paths to PAUSE. This is a shorthand for bump
, dist
and
upload
. The bump
part can be skipped using --no-bump
.
Create a new runnable Perl 6 script in the bin/
directory. A small skeleton
template is inserted into the new file. Additionally, the META6.json
is
updated accordingly to contain the new file in its provides
section.
Create a new module file in the lib/
directory. A skeleton for a class
structure is inserted in the new file, and directories are created needed to
place the file in the correct location. Additionally, the META6.json
is
updated accordingly to contain the new module file in its provides
section.
Create a new resource file in the resources/
directory. Directories are
created as needed. Additionally, the META6.json
is updated accordingly to
contain the new resource in its resources
section.
Create a new test spec file in the t/
directory. Directories are created as
needed.
Create a new unit module file in the lib/
directory. A skeleton for a unit
module structure is inserted in the new file, and directories are created
needed to place the file in the correct location. Additionally, the
META6.json
is updated accordingly to contain the new module file in its
provides
section.
Uploads the given dists to PAUSE. A PAUSE ID and password for authentication
can be supplied using --pause-id=<id>
and --pause-password=<password>
respectively. If not supplied, these will be read from your configuration. If
these are not set in the configuration, they will be prompted for.
Use the specified config file as final config. Any settings given in the config
file specified by this option will override the settings given in other config
files. When used with bootstrap config
, the changed configuration will be
written to the file specified by this option.
Remove all sanity checks on a given command. This can have unwanted results, hence you should only use this if you know what you’re doing. Using this option can result in loss of data.
Build a configuration file for cpan6
. You will be prompted for all options
available. If you already have a configuration file, the options already
configured can be skipped by hitting enter.
Create a new module named My::Little::Module
. The skeleton required for a
module will be created for you. The default prefix is perl6-
for the
directory name, which will result in perl6-my-little-module
as the resulting
directory.
Add the Config
module as a dependency. This will add it to the META6.json
file and call zef install Config
.
Creates a new Perl 6 class, with a default skeleton. Directories will be
created as needed. The class will also be added to the provides
section of
your META6.json
.
Creates a new Perl 6 unit module file, with a default skeleton. Directories
will be created as needed. The unit module will also be added to the provides
section of your META6.json
.
Wraps the current directory into a .tar.gz
distribution, and saves it to your
cpan6 dist folder. This is ~/.local/var/cpan6/dists
by default.
Bugs can be reported on the Github page of this project: https://github.com/scriptkitties/perl6-App-Cpan6.
The config bootstrap currently inserts an additional \
in front of the @
used in the email. This is in error, as the email address is already in double
quotes. This will have the result of the configuration file completely failing
to load. Removing the \
solves the issue for now.
Originally written by Patrick Spek <[email protected]>.