File tree Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Expand file tree Collapse file tree 1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ # A feature to automatically "yield true" at the end of a file
2
+
3
+ ## Preamble
4
+
5
+ Author: Curtis "Ovid" Poe <[email protected] >
6
+ Sponsor:
7
+ ID: 0018
8
+ Status: Draft
9
+
10
+ ## Abstract
11
+
12
+ This RFC proposes a ` yield_true ` feature. When used, the current Perl _ file_
13
+ containing ` use feature 'yield_true'l ` will automatically return a true value
14
+ after successful compilation, eliminating the neeed for a "1" (or other true
15
+ value) at the end of the file.
16
+
17
+ ## Motivation
18
+
19
+ Eliminate the need for a true value at the end of a Perl file.
20
+
21
+ ## Rationale
22
+
23
+ There's no need to have a true value be hard-coded in our files that we
24
+ ` use ` . Further, newer programmers can get confused because sometimes code
25
+ _ doesn't_ end with a true value but nonetheless compiles just fine because
26
+ _ something_ in the code returned a true value and the code compiles as a
27
+ side-effect.
28
+
29
+
30
+ ## Specification
31
+
32
+ use feature 'yield_true';
33
+
34
+ Code using the above does not need to return a magic true value when compiled.
35
+
36
+ ## Backwards Compatibility
37
+
38
+ There are no compatibility concerns I'm aware of.
39
+
40
+ ## Security Implications
41
+
42
+ None expected.
43
+
44
+ ## Examples
45
+
46
+ None. See above.
47
+
48
+ ## Prototype Implementation
49
+
50
+ None.
51
+
52
+ ## Future Scope
53
+
54
+ I believe this is complete.
55
+
56
+ ## Rejected Ideas
57
+
58
+ None that I'm aware of.
59
+
60
+ ## Open Issues
61
+
62
+ None that I'm aware of.
63
+
64
+ ## Copyright
65
+
66
+ Copyright (C) 2022, Curtis "Ovid" Poe
67
+
68
+ This document and code and documentation within it may be used, redistributed
69
+ and/or modified under the same terms as Perl itself.
You can’t perform that action at this time.
0 commit comments