Skip to content

Commit

Permalink
Restores the information on the api field
Browse files Browse the repository at this point in the history
As requested by @jonathanstowe and @ugexe
  • Loading branch information
JJ committed Jan 8, 2019
1 parent 2dcce0a commit d784111
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions doc/Language/modules.pod6
Expand Up @@ -6,12 +6,12 @@
=head1 Creating and using modules
A module is usually a source file or set of source files that expose Perl 6
constructs.
A module is usually a source file or set of source files that expose
Perl 6 constructs.
N<Technically a
module is a set of I<compunits> which are usually files but could come from
anywhere as long as there is a I<compunit repository> that can provide it. See
N<Technically a module is a set of I<compunits> which are usually files
but could come from anywhere as long as there is a I<compunit
repository> that can provide it. See
L<S11|https://design.perl6.org/S11.html>.>
Modules are typically packages (L<classes|/language/objects#Classes>,
Expand All @@ -24,21 +24,23 @@ mean "module" as a set of source files in a namespace.
=head2 Looking for and installing modules.
L<C<zef>|https://github.com/ugexe/zef> is the application using for installing
modules in Perl 6. Modules are listed in
L<the Perl 6 ecosystem|https://modules.perl6.org>
and can be searched there or from the
command line using C<zef search>
L<C<zef>|https://github.com/ugexe/zef> is the application used for
installing modules in Perl 6. Modules are listed in L<the Perl 6
ecosystem|https://modules.perl6.org> and can be searched there or from
the command line using C<zef search>
=for code :lang<shell>
zef search WWW
will return a list of modules that includes WWW in their name, for instance. Then,
will return a list of modules that includes WWW in their name, for
instance. Then,
=for code :lang<shell>
zef install WWW
will install the module with that particular name, if it is not already installed.
will install the module with that particular name, if it is not already
installed. N<If it's installed it will reinstall only if the version of
the module is newer than the one installed>
=head2 Basic structure
Expand Down Expand Up @@ -677,6 +679,7 @@ Make your X<C<META6.json>|META6.json> file look something like this:
{
"perl" : "6.c",
"name" : "Vortex::TotalPerspective",
"api" : "1",
"auth" : "github:SomeAuthor",
"version" : "0.0.1",
"description" : "Wonderful simulation to get some perspective.",
Expand Down Expand Up @@ -714,10 +717,18 @@ The C<name> key is compulsory, and C<zef> will fail if you do not include it.
Even if you have created a META6.json file just to express the dependencies
for a series of scripts, this section must be included.
The C<auth> section identifies the author in GitHub or other repository hosting
site, such as Bitbucket or GitLab. This field is I<customary>, since it's used
to identify the author in the ecosystem, and opens the possibility of having
modules with the same name and different authors.
Optionally, you can set an C<api> field. Incrementing this indicates
that the interface provided by your module is not backwards compatible
with a previous version. You can use it if you want to adhere to
L<Semantic Versioning|https://semver.org>. A best practice is to simply
keep the C<api> field to the same value as your major version number. A
dependency can then depend on your module by including a C<:api> part,
which will ensure backwards incompatible releases will not be pulled in.
The C<auth> section identifies the author in GitHub or other repository
hosting site, such as Bitbucket or GitLab. This field is I<customary>,
since it's used to identify the author in the ecosystem, and opens the
possibility of having modules with the same name and different authors.
The C<authors> section includes a list of all the module authors. In
the case there is only one author, a single element list must be
Expand Down

0 comments on commit d784111

Please sign in to comment.