Skip to content

Commit 456abd4

Browse files
Ovidrjbs
authored andcommitted
Adjust RFC based on some feedback from leonerd
1 parent 7f15575 commit 456abd4

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

rfcs/rfcOVID-0018.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
# A feature to automatically "yield true" at the end of a file
1+
# No Longer Requiring a True Value at the End of a Module
22

33
## Preamble
44

55
Author: Curtis "Ovid" Poe <[email protected]>
66
Sponsor:
7-
ID: OVID-0018
7+
ID: 0018
88
Status: Draft
99

1010
## Abstract
1111

12-
This RFC proposes a `yield_true` feature. When used, the current Perl _file_
13-
containing `use feature 'yield_true';` will automatically return a true value
14-
after successful compilation, eliminating the need for a "1" (or other true
15-
value) at the end of the file.
12+
This RFC proposes a feature which, when used, causes the current Perl file to
13+
to yield a true value when C<require>d, eliminating the need for a "1" (or
14+
other true value) at the end of the file.
1615

1716
## Motivation
1817

@@ -28,18 +27,23 @@ side-effect.
2827

2928
## Specification
3029

31-
use feature 'yield_true';
30+
use feature 'module_true';
3231

33-
Code using the above does not need to return a magic true value when compiled.
32+
B<Note>: the feature name is not settled, C<yield_true>, C<module_true>, and
33+
C<module_is_true> have all been suggested.
34+
35+
Code using the above does not need to end in a true value when required.
3436

3537
If the module explicitly returns a false value, module loading will fail as it
3638
does now. If the module author wants the module to fail to load under certain
37-
conditions, they should die with an appropriate error message rather than
38-
returning false.
39+
conditions, they should use C<die> or a similar mechanism with an appropriate
40+
error message rather than returning false.
3941

4042
## Backwards Compatibility
4143

42-
There are no compatibility concerns I'm aware of.
44+
There are no compatibility concerns I'm aware of because we're only suggesting
45+
changing behaviour in the presence of a newly-added feature that is not
46+
present in any existing code.
4347

4448
## Security Implications
4549

0 commit comments

Comments
 (0)