Skip to content

Commit 950ec65

Browse files
nicomenrjbs
authored andcommitted
Slight rework, add plan as stated by Neil Bowers in comment as part of specification. Split up core/dual-life issues
1 parent 105fd97 commit 950ec65

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

rfcs/rfc0015.md

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,7 @@ From perldoc perlmod
2424
* We have been warning against its usage for decades.
2525
* It was there merely for easier adoption, but has been used very little.
2626

27-
## Specification
28-
29-
## Backwards Compatibility
30-
31-
## Open Issues
27+
## Alternatives
3228

3329
There are a few alternatives on how to disable this feature and changing the meaning of `'`
3430

@@ -71,21 +67,39 @@ $ perl -wlE 'sub foo'"'"'bar { "lol"; }; print foo'"'"'bar();'
7167
lol
7268
```
7369

70+
## Specification
71+
72+
The feature should be rolled out in two steps, in two consecutive Perl stable releases
73+
74+
1. Add warning code to apostrophe usage in identifiers (outside of string interpolation) (alternative `4`) (as has been done for string interpolation already (alternative `c`)) [6]
75+
76+
2. Syntax error when using apostrophe as part of identifiers outside strings (alternative `b`), treat apostrophes inside strings as not a part of a variable when interpolating (alternative `1`)
77+
78+
## Backwards Compatibility
79+
80+
This change will break backwards compatibility in two stable releases
81+
7482
### Known core / dual-life modules utilizing apostrophe as separator
7583

84+
The following issues are slowly being sorted out independently of this RFC.
85+
7686
* ~~cpan/Term-Cap `isn't` in test [trivial to replace] https://github.com/jonathanstowe/Term-Cap/pull/13~~ [fixed]
7787
* ~~dist/PathTools `isn't` in test [trivial to replace] https://github.com/Perl/perl5/pull/19865~~ [fixed]
7888
* cpan/autodie test in Klingon [not THAT trivial to replace, don't know Klingon] https://github.com/pjf/autodie/issues/115
89+
90+
The following issues might need to synchronize with the perl releases by checking versions or feature flags
91+
7992
* ~~cpan/Test-Simple `isn::t` [would work wth 2 + b with small change, or state compatibility in docs]~~ [fixed] https://github.com/Test-More/test-more/commit/d619c1b0486422ac86b6c870241bf6138a041a8f
8093
* cpan/Scalar-List-Utils `set_subname` implementation [need to check perl version in .xs code etc]
8194

8295
## References
8396

84-
* Old package separator syntax #16270 (rt.perl.org#132485) https://github.com/Perl/perl5/issues/16270
85-
* Discussion from 2009 at perl5-porters: https://markmail.org/message/gaux5xx5jlop3vmk
86-
* Discussion from 2017 at perl5-porters: https://markmail.org/message/ffmc2k3xafhwajys
87-
* Discussion from 2021 at perl5-porters: https://markmail.org/message/hms4gy4okkgvnk23
88-
* Simple grep of `isn't` usage on CPAN: `https://grep.metacpan.org/search?q=%5E%5Cs*isn%27t%7Cisn%27t%5Cs*%5B%28%24%40%25%5D&qd=&qft=*.t` (Note that there quite a few false positives, so I'd guess more like 30 pkgs)
97+
* [1] Old package separator syntax #16270 (rt.perl.org#132485) https://github.com/Perl/perl5/issues/16270
98+
* [2] Discussion from 2009 at perl5-porters: https://markmail.org/message/gaux5xx5jlop3vmk
99+
* [3] Discussion from 2017 at perl5-porters: https://markmail.org/message/ffmc2k3xafhwajys
100+
* [4] Discussion from 2021 at perl5-porters: https://markmail.org/message/hms4gy4okkgvnk23
101+
* [5] Simple grep of `isn't` usage on CPAN: `https://grep.metacpan.org/search?q=%5E%5Cs*isn%27t%7Cisn%27t%5Cs*%5B%28%24%40%25%5D&qd=&qft=*.t` (Note that there quite a few false positives, so I'd guess more like 30 pkgs)
102+
* [6] Father Chrysostomos added a warning when used apostrophes are used inside string within a variable name: https://github.com/Perl/perl5/commit/2cb35ee012cfe486aa75a422e7bb3cb18ff51336
89103

90104
## Conditions to test
91105

0 commit comments

Comments
 (0)