Skip to content

Commit 445bf0d

Browse files
committed
RFC 0018: make text follow suggestion from davem
1 parent 3044065 commit 445bf0d

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

rfcs/rfcOVID-0018.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99

1010
## Abstract
1111

12-
This RFC proposes a feature which, when used, causes the current Perl file to
13-
to yield a true value when `require`, eliminating the need for a "1" (or
14-
other true value) at the end of the file.
12+
This RFC proposes a feature which, when used, eliminates the need to end a Perl
13+
module with the conventional "1" or other true value.
1514

1615
## Motivation
1716

@@ -27,17 +26,15 @@ side-effect.
2726

2827
## Specification
2928

30-
use feature 'module_true';
29+
First, a new `feature` is added:
3130

32-
**Note**: the feature name is not settled, `yield_true`, `module_true`, and
33-
`module_is_true` have all been suggested.
34-
35-
Code using the above does not need to end in a true value when required.
31+
```perl
32+
use feature 'module_true';
33+
```
3634

37-
If the module explicitly returns a false value, module loading will fail as it
38-
does now. If the module author wants the module to fail to load under certain
39-
conditions, they should use `die` or a similar mechanism with an appropriate
40-
error message rather than returning false.
35+
Then, *whenever* a module is loaded with `require` (or an equivalent, like
36+
`use`), the "croak if false" test is skipped if the `module_true` feature was
37+
in effect at the last statement executed in the required module.
4138

4239
## Backwards Compatibility
4340

0 commit comments

Comments
 (0)