Skip to content

Commit 2c389da

Browse files
committed
more documentation improvements
1 parent 0ef6a2f commit 2c389da

File tree

7 files changed

+153
-94
lines changed

7 files changed

+153
-94
lines changed

Changes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Revision history for Perl module {{$dist->name}}
22

33
{{$NEXT}}
4-
- Documentation improvements (gh#30)
4+
- Documentation improvements (gh#30, gh#31)
55

66
1.16_01 2022-09-11 15:29:26 -0600
77
- Add support for ALIEN_DOWNLOAD_RULE (gh#28, gh#29)

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ my $builder = Alien::Base::ModuleBuild->new(
2525
# system version of the mylibrary
2626

2727
alien_repository => {
28-
protocol => 'http',
28+
protocol => 'https',
2929
host => 'myhost.org',
3030
location => '/path/to/tarballs',
3131
pattern => qr{^mylibrary-([0-9\.]+)\.tar\.gz$},
@@ -144,11 +144,12 @@ this method.
144144
my %result = $amb->alien_do_system($cmd)
145145
```
146146

147-
Similar to [Module::Build::do\_system](https://metacpan.org/pod/Module::Build::do_system), also sets the path and several
148-
environment variables in accordance to the object configuration
149-
(i.e. `alien_bin_requires`) and performs the interpolation of the
150-
patterns described in ["COMMAND
151-
INTERPOLATION" in Alien::Base::ModuleBuild::API](https://metacpan.org/pod/Alien::Base::ModuleBuild::API#COMMAND-INTERPOLATION).
147+
Similar to
148+
[Module::Build's do\_system](https://metacpan.org/pod/Module::Build::API#do_system-cmd-args),
149+
also sets the path and several environment variables in accordance
150+
to the object configuration (i.e. `alien_bin_requires`) and
151+
performs the interpolation of the patterns described in
152+
["COMMAND INTERPOLATION" in Alien::Base::ModuleBuild::API](https://metacpan.org/pod/Alien::Base::ModuleBuild::API#COMMAND-INTERPOLATION).
152153

153154
Returns a set of key value pairs including `stdout`, `stderr`,
154155
`success` and `command`.
@@ -227,6 +228,19 @@ The documentation for `Module::Build` is broken up into sections:
227228
This is a reference to the `Alien::Base::ModuleBuild` API beyond that contained
228229
in `Module::Build::API`.
229230

231+
- Using the resulting [Alien](https://metacpan.org/pod/Alien) ([Alien::Build::Manual::AlienUser](https://metacpan.org/pod/Alien::Build::Manual::AlienUser))
232+
233+
Once you have an [Alien](https://metacpan.org/pod/Alien) you or your users can review this manual for how to use
234+
it. Generally speaking you should have some useful usage information in your
235+
[Alien](https://metacpan.org/pod/Alien)'s POD, but some authors choose to direct their users to this manual
236+
instead.
237+
238+
- Using [Alien::Build](https://metacpan.org/pod/Alien::Build) instead ([Alien::Build::Manual](https://metacpan.org/pod/Alien::Build::Manual))
239+
240+
As mentioned at the top, you are encouraged to use the [Alien::Build](https://metacpan.org/pod/Alien::Build) and
241+
[alienfile](https://metacpan.org/pod/alienfile) system instead. This manual is a starting point for the other
242+
[Alien::Build](https://metacpan.org/pod/Alien::Build) documentation.
243+
230244
# ENVIRONMENT
231245

232246
- **ALIEN\_ARCH**
@@ -275,7 +289,7 @@ The documentation for `Module::Build` is broken up into sections:
275289

276290
- **ALIEN\_INSTALL\_TYPE**
277291

278-
Set to 'share' or 'system' to override the install type. Set to 'default' or unset
292+
Set to `share` or `system` to override the install type. Set to `default` or unset
279293
to restore the default.
280294

281295
- **ALIEN\_VERBOSE**

lib/Alien/Base/ModuleBuild.pm

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ In your Build.PL:
13191319
# system version of the mylibrary
13201320
13211321
alien_repository => {
1322-
protocol => 'http',
1322+
protocol => 'https',
13231323
host => 'myhost.org',
13241324
location => '/path/to/tarballs',
13251325
pattern => qr{^mylibrary-([0-9\.]+)\.tar\.gz$},
@@ -1432,11 +1432,12 @@ this method.
14321432
14331433
my %result = $amb->alien_do_system($cmd)
14341434
1435-
Similar to L<Module::Build::do_system>, also sets the path and several
1436-
environment variables in accordance to the object configuration
1437-
(i.e. C<alien_bin_requires>) and performs the interpolation of the
1438-
patterns described in L<Alien::Base::ModuleBuild::API/COMMAND
1439-
INTERPOLATION>.
1435+
Similar to
1436+
L<Module::Build's do_system|Module::Build::API/"do_system($cmd, @args)">,
1437+
also sets the path and several environment variables in accordance
1438+
to the object configuration (i.e. C<alien_bin_requires>) and
1439+
performs the interpolation of the patterns described in
1440+
L<Alien::Base::ModuleBuild::API/"COMMAND INTERPOLATION">.
14401441
14411442
Returns a set of key value pairs including C<stdout>, C<stderr>,
14421443
C<success> and C<command>.
@@ -1509,6 +1510,19 @@ L<Alien::Base> projects, it is located in the upper namespace.
15091510
This is a reference to the C<Alien::Base::ModuleBuild> API beyond that contained
15101511
in C<Module::Build::API>.
15111512
1513+
=item Using the resulting L<Alien> (L<Alien::Build::Manual::AlienUser>)
1514+
1515+
Once you have an L<Alien> you or your users can review this manual for how to use
1516+
it. Generally speaking you should have some useful usage information in your
1517+
L<Alien>'s POD, but some authors choose to direct their users to this manual
1518+
instead.
1519+
1520+
=item Using L<Alien::Build> instead (L<Alien::Build::Manual>)
1521+
1522+
As mentioned at the top, you are encouraged to use the L<Alien::Build> and
1523+
L<alienfile> system instead. This manual is a starting point for the other
1524+
L<Alien::Build> documentation.
1525+
15121526
=back
15131527
15141528
=head1 ENVIRONMENT
@@ -1565,7 +1579,7 @@ Set to C<0> or another false value to turn off network installs.
15651579
15661580
=item B<ALIEN_INSTALL_TYPE>
15671581
1568-
Set to 'share' or 'system' to override the install type. Set to 'default' or unset
1582+
Set to C<share> or C<system> to override the install type. Set to C<default> or unset
15691583
to restore the default.
15701584
15711585
=item B<ALIEN_VERBOSE>

lib/Alien/Base/ModuleBuild/API.pod

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
=head1 DESCRIPTION
66

77
B<NOTE>: Please consider for new development of L<Alien>s that you use
8-
L<Alien::Build> and L<alienfile> instead. Like L<Alien::Base::ModuleBUild> they work
9-
with L<Alien::Base>. Unlike L<Alien::Base::Module::Build> they are more easily customized
8+
L<Alien::Build> and L<alienfile> instead. Like L<Alien::Base::ModuleBuild> they work
9+
with L<Alien::Base>. Unlike L<Alien::Base::ModuleBuild> they are more easily customized
1010
and handle a number of corner cases better. For a good place to start,
11-
please see L<Alien::Build::Manual::AlienAuthor>. Although the
11+
please see L<Alien::Build::Manual::AlienAuthor>. Although the
1212
Alien-Base / Alien-Build team will continue to maintain this module,
1313
(we will continue to fix bugs where appropriate), we aren't adding any
1414
new features to this module.
1515

16-
A list of extra properties and methods provided by
16+
A list of extra properties and methods provided by
1717
L<Alien::Base::ModuleBuild> beyond those contained in L<Module::Build::API>.
18-
Note that all property and method names are prefixed with C<alien_> to prevent future
18+
Note that all property and method names are prefixed with C<alien_> to prevent future
1919
collisions L<Module::Build> builtins.
2020

2121
=head2 CONSTRUCTOR
@@ -78,14 +78,14 @@ to remove the variable.
7878
);
7979
...
8080

81-
Please keep in mind that frequently users have a good reason to have set
82-
environment variables, and you should not override them without a good
83-
reason. An example of a good justification would be if a project has a
84-
Makefile that interacts badly with common environment variables. This
81+
Please keep in mind that frequently users have a good reason to have set
82+
environment variables, and you should not override them without a good
83+
reason. An example of a good justification would be if a project has a
84+
Makefile that interacts badly with common environment variables. This
8585
can sometimes be a problem since Makefile variables can be overridden with
8686
environment variables.
8787

88-
A useful pattern is to use a helper to only override an environment
88+
A useful pattern is to use a helper to only override an environment
8989
variable if it is not already set.
9090

9191
...
@@ -101,7 +101,7 @@ variable if it is not already set.
101101
);
102102
...
103103

104-
A common pitfall with environment variables is that setting one to the
104+
A common pitfall with environment variables is that setting one to the
105105
empty string (C<''>) is not portable. On Unix it works fine as you would
106106
expect, but in Windows it actually unsets the environment variable, which
107107
may not be what you intend.
@@ -164,10 +164,10 @@ By default alien_name is used with any C<lib> prefix removed. For example C<lib
164164

165165
[version 0.020]
166166

167-
Provide helpers to generate commands or arguments at build or install time. This property is a hash
168-
reference. The keys are the helper names and the values are strings containing Perl code that will
169-
be evaluated and interpolated into the command before execution. Because helpers are only needed
170-
when building a package from the source code, any dependency may be specified as an
167+
Provide helpers to generate commands or arguments at build or install time. This property is a hash
168+
reference. The keys are the helper names and the values are strings containing Perl code that will
169+
be evaluated and interpolated into the command before execution. Because helpers are only needed
170+
when building a package from the source code, any dependency may be specified as an
171171
C<alien_bin_requires>. For example:
172172

173173
...
@@ -344,15 +344,15 @@ The name of the temporary folder which will house the library when it is downloa
344344

345345
[version 0.001]
346346

347-
An arrayref of commands used to test the library. Each command is first
347+
An arrayref of commands used to test the library. Each command is first
348348
passed through the L<command interpolation engine|/"COMMAND INTERPOLATION">,
349349
so those variables may be used. The default is to do no tests. The most
350350
common command used by the GNU toolchain is C<[ 'make check' ]>, but beware
351351
that is not supported by all packages.
352352

353353
[version 0.009]
354354

355-
Each command may be either a string or an array reference. If the array
355+
Each command may be either a string or an array reference. If the array
356356
reference form is used, then the multiple argument form of system is used.
357357

358358
=item alien_version_check
@@ -367,7 +367,7 @@ A command to run to check the version of the library installed on the system. Th
367367

368368
A few global variables are used to set gross behavior. For each pair of variables, if both are set, the environment variable takes precedence.
369369

370-
=over
370+
=over
371371

372372
=item $ENV{ALIEN_ARCH}
373373

@@ -379,7 +379,7 @@ integrators creating a single non-architecture specific RPM, .deb or similar pac
379379

380380
=item $ENV{ALIEN_BLIB}
381381

382-
Setting this to true indicates that you don't intend to actually install your Alien::Base subclass, but rather use it from the built F<blib> directory. This behavior is mostly to support automated testing from CPANtesters and should be automagically determined. If by chance you happen to trip the behavior accidentally, setting this environment variable to false (0) before building should prevent problems.
382+
Setting this to true indicates that you don't intend to actually install your Alien::Base subclass, but rather use it from the built F<blib> directory. This behavior is mostly to support automated testing from CPANtesters and should be automagically determined. If by chance you happen to trip the behavior accidentally, setting this environment variable to false (0) before building should prevent problems.
383383

384384
=item $Alien::Base::ModuleBuild::Force
385385

@@ -395,7 +395,7 @@ Setting to C<share> will ignore a system-wide installation and build a local ver
395395

396396
=item $ENV{ALIEN_VERBOSE}
397397

398-
Setting the either to a true value will output a little more info from within the module itself. At this point L<Alien::Base> is going to be fairly verbose without this enabled.
398+
Setting the either to a true value will output a little more info from within the module itself. At this point L<Alien::Base> is going to be fairly verbose without this enabled.
399399

400400
=back
401401

@@ -511,7 +511,7 @@ A literal C<%>.
511511

512512
=over
513513

514-
=item *
514+
=item *
515515

516516
L<Module::Build::API>
517517

lib/Alien/Base/ModuleBuild/Authoring.pod

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
B<NOTE>: Please consider for new development of L<Alien>s that you use
88
L<Alien::Build> and L<alienfile> instead. Like L<Alien::Base::ModuleBuild> they work
9-
with L<Alien::Base>. Unlike L<Alien::Base::Module::Build> they are more easily customized
9+
with L<Alien::Base>. Unlike L<Alien::Base::ModuleBuild> they are more easily customized
1010
and handle a number of corner cases better. For a good place to start,
11-
please see L<Alien::Build::Manual::AlienAuthor>. Although the
11+
please see L<Alien::Build::Manual::AlienAuthor>. Although the
1212
Alien-Base / Alien-Build team will continue to maintain this module,
1313
(we will continue to fix bugs where appropriate), we aren't adding any
1414
new features to this module.
@@ -17,8 +17,8 @@ Congratulations! You have made the decision to help the Perl community by provid
1717

1818
=head1 STATUS
1919

20-
L<Alien::Base> is under active development. The API is relatively
21-
stable, although breaking changes may be introduced if the rewards are
20+
L<Alien::Base> is under active development. The API is relatively
21+
stable, although breaking changes may be introduced if the rewards are
2222
deemed greater than the pains that they produce.
2323

2424
=head1 ECOSYSTEM
@@ -51,7 +51,7 @@ C<Alien::MyLibrary> is called by C<Some::Library::MyLibrary>'s build script, eit
5151
# file: Some-Module-MyLibrary/Build.PL
5252
use Module::Build;
5353
use Alien::MyLibrary;
54-
54+
5555
my $alien = Alien::MyLibrary->new;
5656
my $builder = Module::Build->new(
5757
...
@@ -68,22 +68,22 @@ C<Alien::MyLibrary> must be a subclass of L<Alien::Base>. This provides the C<im
6868

6969
# file: Alien-MyLibrary/lib/Alien/MyLibrary.pm
7070
package Alien::MyLibrary;
71-
71+
7272
use parent 'Alien::Base';
73-
73+
7474
1;
7575

7676
Finally, C<Alien::MyLibrary> must also be called by C<Some::Library::MyLibrary> before C<DynaLoader::bootstrap> or C<XSLoader::load>. The C<use> directive is recommended, however if you must use C<require> then be sure to call the C<import> method too. Without this C<import> call, the loader doesn't know where to find F<libmylibrary.so>.
7777

7878
# file: Some-Module-MyLibrary/lib/Some/Module/MyLibrary.pm
7979
package Some::Module::MyLibrary;
80-
80+
8181
use Alien::MyLibrary;
8282
our $VERSION = '0.54';
83-
83+
8484
require XSLoader;
8585
XSLoader::load('Some::Module::MyLibrary', $VERSION);
86-
86+
8787
# your code
8888

8989
=head1 EXAMPLES
@@ -126,7 +126,7 @@ L<Alien::gmake> -- Builds and installs GNU make. Rather than being a library, t
126126

127127
=over
128128

129-
=item *
129+
=item *
130130

131131
L<Module::Build>
132132

0 commit comments

Comments
 (0)