Skip to content

Commit 4df8cb2

Browse files
authored
Merge pull request #2442 from uzluisf/master
Text reflow and ...
2 parents 2b004c6 + 86856f0 commit 4df8cb2

File tree

1 file changed

+46
-29
lines changed

1 file changed

+46
-29
lines changed

doc/Language/modules.pod6

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ N<As L<synopsis S11|https://design.perl6.org/S11.html#Units> says: Confusing? Ye
5454
directory for executable programs and scripts.
5555
5656
Source files generally use the C<.pm6> extension, and scripts or
57-
executables use the C<.p6>. Test files use the C<.t> extension. Files which contain documentation use the C<.pod6> extension.
57+
executables use the C<.p6>. Test files use the C<.t> extension. Files which
58+
contain documentation use the C<.pod6> extension.
5859
5960
X<|compunit>
6061
=head2 Loading and basic importing
@@ -233,7 +234,8 @@ Bar;" to your code.
233234
=head3 is export
234235
235236
Packages, subroutines, variables, constants and enums are exported by marking
236-
them with the L<is export> trait (also note the tags available for indicating authors and versions).
237+
them with the L<is export> trait (also note the tags available for indicating
238+
authors and versions).
237239
238240
=begin code :solo
239241
unit module MyModule:ver<1.0.3>:auth<John Hancock (jhancock@example.com)>;
@@ -527,7 +529,8 @@ followed.
527529
=head1 Distributing modules
528530
529531
If you've written a Perl 6 module and would like to share it with the
530-
community, we'd be delighted to have it listed in the L<Perl 6 modules directory|https://modules.perl6.org>. C<:)>
532+
community, we'd be delighted to have it listed in the
533+
L<Perl 6 modules directory|https://modules.perl6.org>. C<:)>
531534
532535
Currently there are two different module ecosystems (module distribution
533536
networks) available:
@@ -679,12 +682,16 @@ Make your X<C<META6.json>|META6.json> file look something like this:
679682
=end code
680683
681684
For choosing a version numbering scheme, try and use
682-
"major.minor.patch" (see L<the spec on versioning | https://design.perl6.org/S11.html#Versioning> for further
683-
details). This will go into the C<version> key of C<META6.json>.
685+
"major.minor.patch"
686+
(see L<the spec on versioning | https://design.perl6.org/S11.html#Versioning>
687+
for further details). This will go into the C<version> key of C<META6.json>.
684688
685-
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.
689+
The C<name> key is compulsory, and C<zef> will fail if you do not include it.
690+
Even if you have created a META6.json file just to express the dependencies
691+
for a series of scripts, this section must be included.
686692
687-
The C<auth> section identifies the author in GitHub or other repository hosting site, such as Bitbucket.
693+
The C<auth> section identifies the author in GitHub or other repository
694+
hosting site, such as Bitbucket.
688695
689696
The C<authors> section includes a list of all the module authors. In
690697
the case there is only one author, a single element list must be
@@ -699,28 +706,35 @@ Set C<perl> version to the minimum perl version your module works with.
699706
700707
Optionally, you can set an C<api> field. Incrementing this indicates that
701708
the interface provided by your module is not backwards compatible with a
702-
previous version. You can use it if you want to adhere to L<Semantic Versioning | https://semver.org>. Simply keep the C<api> field to the same value as
703-
your major version number. A dependency can then depend on your module by
704-
including a C<:api> part, which will ensure backwards incompatible releases
705-
will not be pulled in.
706-
707-
The C<resources> section is optional, but, if present, should contain a
708-
list of the files in your C<resources> directory that you wish to be
709-
installed. These will be installed with hashed names alongside your
710-
library files and their installed location can be determined through the
711-
C<%?RESOURCES> C<Hash> indexed on the name provided. C<tags> is also optional, but is used to describe the module in the Perl 6 ecosystem.
712-
713-
C<depends>, C<build-depends> and C<test-depends> include different modules that are used in those phases of the of installation. The last two are optional, but convenient.
714-
715-
Finally, C<source-url> indicates the URL of the repository where the module is developed.
709+
previous version. You can use it if you want to adhere to
710+
L<Semantic Versioning | https://semver.org>. Simply keep the C<api> field to
711+
the same value as your major version number. A dependency can then depend on
712+
your module by including a C<:api> part, which will ensure backwards
713+
incompatible releases will not be pulled in.
714+
715+
The C<resources> section is optional, but, if present, should contain a list
716+
of the files in your C<resources> directory that you wish to be installed.
717+
These will be installed with hashed names alongside your library files and
718+
their installed location can be determined through the C<%?RESOURCES> C<Hash>
719+
indexed on the name provided. C<tags> is also optional, but is used to describe
720+
the module in the Perl 6 ecosystem.
721+
722+
C<depends>, C<build-depends> and C<test-depends> include different modules that
723+
are used in those phases of the of installation. The last two are optional, but
724+
convenient.
725+
726+
Finally, C<source-url> indicates the URL of the repository where the module is
727+
developed.
716728
717729
The L<Test::META module | https://github.com/jonathanstowe/Test-META/>
718730
can help you check the correctness of the META6.json file.
719731
720-
There are more fields described in the L<META design documents |https://design.perl6.org/S22.html#META6.json>, but not all of these are
721-
implemented by existing package managers. Hence you should stick to the
722-
fields described in the above example block to ensure compatibility with
723-
existing package managers. You can also check L<Moritz Lenz's repository of all modules for examples|https://github.com/moritz/perl6-all-modules/search?l=JSON&q=META6.json&type=>.
732+
There are more fields described in the
733+
L<META design documents |https://design.perl6.org/S22.html#META6.json>, but not
734+
all of these are implemented by existing package managers. Hence you should
735+
stick to the fields described in the above example block to ensure compatibility
736+
with existing package managers. You can also check
737+
L<Moritz Lenz's repository of all modules for examples|https://github.com/moritz/perl6-all-modules/search?l=JSON&q=META6.json&type=>.
724738
725739
=end item
726740
@@ -768,11 +782,13 @@ L<Upload a file to CPAN|https://pause.perl.org/pause/authenquery?ACTION=add_uri>
768782
769783
=item Make sure you select C<Perl6> as the I<Target Directory>. For
770784
your first upload, you have to enter the string C<Perl6> in the text field.
771-
On subsequent uploads, you can select the C<Perl6> directory from select
772-
box above the input field.
785+
On subsequent uploads, you can select the C<Perl6> directory from the
786+
selection box right below the input field.
773787
774788
=begin item
775-
Select your file and click I<Upload>!
789+
Select your file and click I<Upload>! If everything was fine with your
790+
dist, you should see your module tar file in your C<Perl6> directory along
791+
with both a meta and a readme file named after your module filename.
776792
777793
I<Make sure you have a META6.json file in your dist and that the dist
778794
version you're uploading is higher than the currently uploaded version.
@@ -821,7 +837,8 @@ zef install Vortex::TotalPerspective
821837
=end code
822838
823839
This will download your module to its own working directory (C<~/.zef>),
824-
build it there, and install the module into your local Perl 6 installation directory.
840+
build it there, and install the module into your local Perl 6 installation
841+
directory.
825842
826843
To use C<Vortex::TotalPerspective> from your scripts, just write
827844
C<use Vortex::TotalPerspective>, and your Perl 6 implementation will

0 commit comments

Comments
 (0)