Skip to content

Commit eaefb19

Browse files
leonerdrjbs
authored andcommitted
Rename load() to load_module()
1 parent 842a48b commit eaefb19

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

rfcs/rfc0006.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Module Loading with "load"
1+
# Module Loading with "load\_module"
22

33
## Preamble
44

@@ -9,8 +9,8 @@
99

1010
## Abstract
1111

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.
1414

1515
## Motivation
1616

@@ -32,20 +32,20 @@ eliminates argument about what or how.
3232
## Specification
3333

3434
```pod
35-
=item load EXPR
35+
=item load_module EXPR
3636
3737
This loads a named module from the inclusion paths (C<@INC>). EXPR must be
3838
a string that provides a module name. It cannot be omitted, and providing
3939
an invalid module name will result in an exception.
4040

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,
4343
or does not evalute to a true value.
4444

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.
4747

48-
C<load> is only available when requested.
48+
C<load_module> is only available when requested.
4949
```
5050

5151
Note: The "how" of "when requested" is to be determined. If implemented
@@ -75,7 +75,7 @@ A simple use case might be:
7575
my $config = read_config;
7676
for my $module (keys $config->{prereq}->%*) {
7777
my ($version) = $config->{prereq}{$module};
78-
load $module;
78+
load_module $module;
7979
$module->VERSION($version) if defined $version;
8080
}
8181
```
@@ -94,7 +94,7 @@ errors.
9494

9595
These problems already exist with `use` and `require`. Addressing them through
9696
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
9898
address all at once.
9999

100100
## Rejected Ideas

0 commit comments

Comments
 (0)