Skip to content

Commit 2341bcf

Browse files
committed
Minor Spelling and formatting changes
I suppose this does not warrant changing the version number.
1 parent 4425736 commit 2341bcf

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

S11-modules.pod

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -24,69 +24,69 @@ been in Apocalypse 11.
2424

2525
=head1 Units
2626

27-
Perl 6 code is compiled per compilation unit, or "compunit" for short. These
27+
Perl 6 code is compiled per compilation unit, or I<compunit> for short. These
2828
are either stored in a file (usually with a .pm or .pm6 extension) and loaded
2929
with a C<use>, C<need> or C<require> statement. Or they are created as a
3030
string in a variable and compiled with an C<eval> statement. This synopsis is
3131
mostly about compunits stored in a file.
3232

33-
In the common vernacular of a Perl 5 developer, a "module" is the same as the
33+
In the common vernacular of a Perl 5 developer, a I<module> is the same as the
3434
file that contains the source code of a package. For Perl 6 developers, this
35-
is not much different. However, such a "module" is really a compunit that may
36-
contain 0 or more package-like statements of "modules". Confusing? Yes it is.
37-
On top of that, Perl 6 allows different versions of the same "module" to be
35+
is not much different. However, such a I<module> is really a compunit that may
36+
contain 0 or more package-like statements of I<modules>. Confusing? Yes it is.
37+
On top of that, Perl 6 allows different versions of the same I<module> to be
3838
installed in a single directory. And it allows compunits from other languages
3939
to be loaded.
4040

4141
In Perl, the C<use> statement is really just telling Perl to find a file for
4242
the given name (after some name to filename translation logic has been applied)
4343
and load its contents. Whether that name is the name of a C<package>,
44-
C<module>, C<class>, C<grammer> or C<role>, a combination of these or
44+
C<module>, C<class>, C<grammar> or C<role>, a combination of these or
4545
something else entirely in a C<slang>, is B<not> known at the moment the file
4646
is searched (and found). Only when the contents of a file are compiled, does
4747
Perl find out what's inside.
4848

49-
In Perl 5, the name to filename translation is mechanical. Foo::Bar will
50-
always refer to Foo/Bar.pm in a directory: it does not need any outside
49+
In Perl 5, the name to filename translation is mechanical. C<Foo::Bar> will
50+
always refer to C<Foo/Bar.pm> in a directory: it does not need any outside
5151
information to find out the name of the file to be loaded. For files that
5252
reside in directories that are not part of the installation, this is the same
5353
in Perl 6. These directories are however typically used for development and/or
5454
testing. Such a directory can be marked as not allowing installed compunits,
55-
e.g. by the existence of a hidden file like ".camelia_dev".
55+
e.g. by the existence of a hidden file like C<.camelia_dev>.
5656

5757
In Perl 6, this is not an option for compunits that have been installed: the
5858
name that indicates a compunit, is case-sensitive and in Unicode. This needs
5959
to be supported even on a system that has a filesystem that is case-insensitive
6060
and/or does not support Unicode and/or does not allow long enough filenames.
6161
Let alone be able to store meta-information, such as the version of the
62-
compunit. Therefor, an authoritative "database" of meta-information of
62+
compunit. Therefore, an authoritative I<database> of meta-information of
6363
installed compunits is needed in those directories that contain installed
6464
compunits. Such a database could be as simple as a hidden text-file named
65-
".camelia".
65+
C<.camelia>.
6666

67-
The optional "unit" statement provides all the necessary meta-information that
67+
The optional C<unit> statement provides all the necessary meta-information that
6868
is needed to add a compunit to a given Perl 6 installation, as well as being
6969
able to load the compunit at a later time. There can only be at most one
70-
"unit" statement per compunit, and it must occur B<before> any "module"-like
70+
C<unit> statement per compunit, and it must occur B<before> any C<module>-like
7171
statement.
7272

7373
The syntax of such a unit declaration has multiple parts in which the
7474
non-identifier parts are specified in adverbial pair notation without
7575
intervening spaces. You may write the various parts in any order, except
7676
that the compunit identifier must come first. The required parts for library
7777
insertion are the name of the compunit, a URI identifying the author
78-
(or authorizing authority, so we call it "auth" to be intentionally ambiguous),
79-
and its version number ("ver" for short). For example:
78+
(or authorizing authority, so we call it I<auth> to be intentionally ambiguous),
79+
and its version number (I<ver> for short). For example:
8080

8181
unit Dog:auth<cpan:JRANDOM>:ver<1.2.1>;
8282
unit Dog:auth<http://www.some.com/~jrandom>:ver<1.2.1>;
8383
unit Dog:auth<mailto:jrandom@some.com>:ver<1.2.1>;
8484

85-
The combination of name, "auth" and "ver", we call the "credentials" of a
85+
The combination of name, I<auth> and I<ver>, we call the I<credentials> of a
8686
compunit.
8787

8888
If a compunit is missing a unit declaration, then the name of the first
89-
"module"-like statement will be assumed as the name of the unit, and the
89+
C<module>-like statement will be assumed as the name of the unit, and the
9090
credentials will be assumed to be just the name. So:
9191

9292
class Dog;
@@ -105,10 +105,10 @@ indentical credentials before.
105105

106106
=head1 Modules
107107

108-
As in Perl 5, a "module" is just a kind of package. Unlike in
108+
As in Perl 5, a C<module> is just a kind of package. Unlike in
109109
Perl 5, modules and classes are declared with separate keywords,
110110
but they're still just packages with extra behaviors. In the case
111-
of modules, the extra behavior is the availability of the 'export' trait
111+
of modules, the extra behavior is the availability of the C<export> trait
112112
and any associated support for Perl 6 standard export semantics.
113113

114114
A module is declared with the C<module> keyword. There are
@@ -142,7 +142,7 @@ does not imply globalness (unlike in Perl 5).
142142
The default namespace for the main program is C<GLOBAL>.
143143
(Putting C<module GLOBAL;> at the top of your program
144144
is redundant, except insofar as it tells Perl that the code is Perl
145-
6 code and not Perl 5 code. But it's better to say "use v6" for that.)
145+
6 code and not Perl 5 code. But it's better to say C<use v6> for that.)
146146

147147
Module traits are set using C<is>:
148148

@@ -557,7 +557,7 @@ Once the auth is selected, then and only then is any version
557557
selection done. This implies that all official compunits record
558558
permanently when they were first installed in the official library,
559559
and this creation date is considered immutable. This date must be specified
560-
with the ":created" adverb in the "unit" statement.
560+
with the C<:created> adverb in the C<unit> statement.
561561

562562
unit Test:auth<cpan:TPF>:ver<1.0>:created<20130625>;
563563

@@ -677,7 +677,7 @@ version number or other literal:
677677
6;
678678
"Coolness, dude!";
679679

680-
it runs Perl 6 in "lax" mode, without strictures or warnings, since obviously
680+
it runs Perl 6 in I<lax> mode, without strictures or warnings, since obviously
681681
a bare literal in a sink (void) context I<ought> to have produced a "Useless use of..." warning.
682682
(Invoking perl with C<-e '6;'> has the same effect.)
683683

@@ -699,7 +699,7 @@ deeply to switch between Perl versions:
699699
It's not necessary to force Perl 6 if the interpreter or command
700700
specified already implies it, such as use of a "C<#!/usr/bin/perl6>"
701701
shebang line. Nor is it necessary to force Perl 6 in any file that
702-
begins with the "unit", "class", "module", "grammar" or "role" keywords.
702+
begins with the C<unit>, C<class>, C<module>, C<grammar> or C<role> keywords.
703703

704704
=head1 Tool use vs language changes
705705

@@ -723,7 +723,7 @@ a derivative of the standard Perl grammar).
723723

724724
Language tweaks are considered part of the interface of any namespace
725725
you import. Version numbers are assumed to represent a combination of
726-
interface and patch level. We will use the term "interface version"
726+
interface and patch level. We will use the term I<interface version>
727727
to represent that part of the version number that represents the
728728
interface. For typical version number schemes, this is the first two
729729
numbers (where the third number usually represents patch level within

0 commit comments

Comments
 (0)