Skip to content

Commit 86856f0

Browse files
committed
Text reflow and ...
Also added "If everything was fine with your dist, you should see your module tar file in your C<Perl6> directory along with both a meta and a readme file named after your module filename." to the "Upload your module to CPAN" section.
1 parent 89ed86f commit 86856f0

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 :skip-test
239241
unit module MyModule:ver<1.0.3>:auth<John Hancock (jhancock@example.com)>;
@@ -529,7 +531,8 @@ followed.
529531
=head1 Distributing modules
530532
531533
If you've written a Perl 6 module and would like to share it with the
532-
community, we'd be delighted to have it listed in the L<Perl 6 modules directory|https://modules.perl6.org>. C<:)>
534+
community, we'd be delighted to have it listed in the
535+
L<Perl 6 modules directory|https://modules.perl6.org>. C<:)>
533536
534537
Currently there are two different module ecosystems (module distribution
535538
networks) available:
@@ -669,12 +672,16 @@ Make your X<C<META6.json>|META6.json> file look something like this:
669672
=end code
670673
671674
For choosing a version numbering scheme, try and use
672-
"major.minor.patch" (see L<the spec on versioning | https://design.perl6.org/S11.html#Versioning> for further
673-
details). This will go into the C<version> key of C<META6.json>.
675+
"major.minor.patch"
676+
(see L<the spec on versioning | https://design.perl6.org/S11.html#Versioning>
677+
for further details). This will go into the C<version> key of C<META6.json>.
674678
675-
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.
679+
The C<name> key is compulsory, and C<zef> will fail if you do not include it.
680+
Even if you have created a META6.json file just to express the dependencies
681+
for a series of scripts, this section must be included.
676682
677-
The C<auth> section identifies the author in GitHub or other repository hosting site, such as Bitbucket.
683+
The C<auth> section identifies the author in GitHub or other repository
684+
hosting site, such as Bitbucket.
678685
679686
The C<authors> section includes a list of all the module authors. In
680687
the case there is only one author, a single element list must be
@@ -689,28 +696,35 @@ Set C<perl> version to the minimum perl version your module works with.
689696
690697
Optionally, you can set an C<api> field. Incrementing this indicates that
691698
the interface provided by your module is not backwards compatible with a
692-
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
693-
your major version number. A dependency can then depend on your module by
694-
including a C<:api> part, which will ensure backwards incompatible releases
695-
will not be pulled in.
696-
697-
The C<resources> section is optional, but, if present, should contain a
698-
list of the files in your C<resources> directory that you wish to be
699-
installed. These will be installed with hashed names alongside your
700-
library files and their installed location can be determined through the
701-
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.
702-
703-
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.
704-
705-
Finally, C<source-url> indicates the URL of the repository where the module is developed.
699+
previous version. You can use it if you want to adhere to
700+
L<Semantic Versioning | https://semver.org>. Simply keep the C<api> field to
701+
the same value as your major version number. A dependency can then depend on
702+
your module by including a C<:api> part, which will ensure backwards
703+
incompatible releases will not be pulled in.
704+
705+
The C<resources> section is optional, but, if present, should contain a list
706+
of the files in your C<resources> directory that you wish to be installed.
707+
These will be installed with hashed names alongside your library files and
708+
their installed location can be determined through the C<%?RESOURCES> C<Hash>
709+
indexed on the name provided. C<tags> is also optional, but is used to describe
710+
the module in the Perl 6 ecosystem.
711+
712+
C<depends>, C<build-depends> and C<test-depends> include different modules that
713+
are used in those phases of the of installation. The last two are optional, but
714+
convenient.
715+
716+
Finally, C<source-url> indicates the URL of the repository where the module is
717+
developed.
706718
707719
The L<Test::META module | https://github.com/jonathanstowe/Test-META/>
708720
can help you check the correctness of the META6.json file.
709721
710-
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
711-
implemented by existing package managers. Hence you should stick to the
712-
fields described in the above example block to ensure compatibility with
713-
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=>.
722+
There are more fields described in the
723+
L<META design documents |https://design.perl6.org/S22.html#META6.json>, but not
724+
all of these are implemented by existing package managers. Hence you should
725+
stick to the fields described in the above example block to ensure compatibility
726+
with existing package managers. You can also check
727+
L<Moritz Lenz's repository of all modules for examples|https://github.com/moritz/perl6-all-modules/search?l=JSON&q=META6.json&type=>.
714728
715729
=end item
716730
@@ -758,11 +772,13 @@ L<Upload a file to CPAN|https://pause.perl.org/pause/authenquery?ACTION=add_uri>
758772
759773
=item Make sure you select C<Perl6> as the I<Target Directory>. For
760774
your first upload, you have to enter the string C<Perl6> in the text field.
761-
On subsequent uploads, you can select the C<Perl6> directory from select
762-
box above the input field.
775+
On subsequent uploads, you can select the C<Perl6> directory from the
776+
selection box right below the input field.
763777
764778
=begin item
765-
Select your file and click I<Upload>!
779+
Select your file and click I<Upload>! If everything was fine with your
780+
dist, you should see your module tar file in your C<Perl6> directory along
781+
with both a meta and a readme file named after your module filename.
766782
767783
I<Make sure you have a META6.json file in your dist and that the dist
768784
version you're uploading is higher than the currently uploaded version.
@@ -811,7 +827,8 @@ zef install Vortex::TotalPerspective
811827
=end code
812828
813829
This will download your module to its own working directory (C<~/.zef>),
814-
build it there, and install the module into your local Perl 6 installation directory.
830+
build it there, and install the module into your local Perl 6 installation
831+
directory.
815832
816833
To use C<Vortex::TotalPerspective> from your scripts, just write
817834
C<use Vortex::TotalPerspective>, and your Perl 6 implementation will

0 commit comments

Comments
 (0)