This is a retrospective Pre-RFC for a proposal from Curtis, for which he submitted a draft RFC[1]. We nearly missed it when reviewing proposals in-flight in our PSC meeting last week, and decided to trigger a discussion here, to reinforce the process.
Beginning and casual Perl programmers regularly get confused / caught out by the requirement to add `1;` at the end of their modules. To add to their confusion, there are plenty of modules on CPAN with humorous alternatives for "1".
Curtis proposed a feature called something like yield_true, which would result in the current file yielding a true value on successful compilation. So a module could then look like this:
package Zork;
use feature 'yield_true';
# code
This is not a feature we’d expect people to use explicitly, but would be part of the version bundle, so you’d get it for free with a future `use v5.XY`.
There’s a module called `true` on CPAN, which provides this[2].
Would this start off experimental? Hopefully not.
Neil
[1] https://github.com/Perl/RFCs/pull/16
[2] https://metacpan.org/pod/true
Beginning and casual Perl programmers regularly get confused / caught out by the requirement to add `1;` at the end of their modules. To add to their confusion, there are plenty of modules on CPAN with humorous alternatives for "1".
Curtis proposed a feature called something like yield_true, which would result in the current file yielding a true value on successful compilation. So a module could then look like this:
package Zork;
use feature 'yield_true';
# code
This is not a feature we’d expect people to use explicitly, but would be part of the version bundle, so you’d get it for free with a future `use v5.XY`.
There’s a module called `true` on CPAN, which provides this[2].
Would this start off experimental? Hopefully not.
Neil
[1] https://github.com/Perl/RFCs/pull/16
[2] https://metacpan.org/pod/true