Starting in Perl 5.38 in 2023, there are new Perl keywords class and method which are analogous to the already-existing package and sub, and the new keywords should be treated identically in the lexer.
Thus, in the code below, the special conditions that cause the $) in sub inPackageProto($) to not be treated like a variable should also be applied to the $) in method inClassProto($):
#!/usr/bin/env perl
package MyPackage::SubPackage {
sub inPackage { return 1 }
sub inPackageProto($) { return $_[0] }
sub inPackageAttrib :prototype($) { return $_[0] }
}
class MyClass::SubClass {
method inClass { return 1 }
method inClassProto($) { return $_[0] }
method inClassAttrib :prototype($) { return $_[0] }
}
Version Shown => SciTE:5.5.8 Scintilla:5.5.8 Lexilla:5.4.6
PS: I understand that for highlighting the class and method keywords, they just need to be added to the perl.properties for SciTE. I will put in a separate issue in the SciTE tracker to request those keywords be added. The focus of this issue is the special handling of $) for subs and methods needing to be identical.
Starting in Perl 5.38 in 2023, there are new Perl keywords
classandmethodwhich are analogous to the already-existingpackageandsub, and the new keywords should be treated identically in the lexer.Thus, in the code below, the special conditions that cause the
$)insub inPackageProto($)to not be treated like a variable should also be applied to the$)inmethod inClassProto($):Version Shown => SciTE:5.5.8 Scintilla:5.5.8 Lexilla:5.4.6
PS: I understand that for highlighting the
classandmethodkeywords, they just need to be added to the perl.properties for SciTE. I will put in a separate issue in the SciTE tracker to request those keywords be added. The focus of this issue is the special handling of$)forsubs andmethods needing to be identical.