1
- # Module Loading with "load"
1
+ # Module Loading with "load\_ module "
2
2
3
3
## Preamble
4
4
9
9
10
10
## Abstract
11
11
12
- This RFC proposes a new built-in, "load", to load modules by module name
13
- (rather than filename) at runtime.
12
+ This RFC proposes a new built-in, "load\_ module ", to load modules by module
13
+ name (rather than filename) at runtime.
14
14
15
15
## Motivation
16
16
@@ -32,20 +32,20 @@ eliminates argument about what or how.
32
32
## Specification
33
33
34
34
``` pod
35
- = item load EXPR
35
+ = item load_module EXPR
36
36
37
37
This loads a named module from the inclusion paths (C<@INC >). EXPR must be
38
38
a string that provides a module name . It cannot be omitted, and providing
39
39
an invalid module name will result in an exception.
40
40
41
- The effect of C<load >-ing a module is the same as C<require >-ing, down to
42
- the same error conditions when the module does not exist, does not compile,
41
+ The effect of C<load_module >-ing a module is the same as C<require >-ing, down
42
+ to the same error conditions when the module does not exist, does not compile,
43
43
or does not evalute to a true value .
44
44
45
- C<load > can 't be used to require a particular version of Perl, nor can it
46
- be given a bareword module name as an argument.
45
+ C<load_module > can 't be used to require a particular version of Perl, nor can
46
+ it be given a bareword module name as an argument.
47
47
48
- C<load > is only available when requested.
48
+ C<load_module > is only available when requested.
49
49
```
50
50
51
51
Note: The "how" of "when requested" is to be determined. If implemented
@@ -75,7 +75,7 @@ A simple use case might be:
75
75
my $config = read_config;
76
76
for my $module (keys $config -> {prereq }-> %*) {
77
77
my ($version ) = $config -> {prereq }{$module };
78
- load $module ;
78
+ load_module $module ;
79
79
$module -> VERSION($version ) if defined $version ;
80
80
}
81
81
```
@@ -94,7 +94,7 @@ errors.
94
94
95
95
These problems already exist with ` use ` and ` require ` . Addressing them through
96
96
more clearly-defined exceptions has been proposed in the past, and this RFC has
97
- not attempted to fix them just for ` load ` . Instead, a future fix should
97
+ not attempted to fix them just for ` load_module ` . Instead, a future fix should
98
98
address all at once.
99
99
100
100
## Rejected Ideas
0 commit comments