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
2
2
3
3
## Preamble
4
4
5
5
Author: Curtis "Ovid" Poe <[email protected] >
6
6
Sponsor:
7
- ID: OVID- 0018
7
+ ID: 0018
8
8
Status: Draft
9
9
10
10
## Abstract
11
11
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.
16
15
17
16
## Motivation
18
17
@@ -28,18 +27,23 @@ side-effect.
28
27
29
28
## Specification
30
29
31
- use feature 'yield_true ';
30
+ use feature 'module_true ';
32
31
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.
34
36
35
37
If the module explicitly returns a false value, module loading will fail as it
36
38
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.
39
41
40
42
## Backwards Compatibility
41
43
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.
43
47
44
48
## Security Implications
45
49
0 commit comments