You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__CLASS__ doesn't issue an warning identifying it as experimental like class, field, ADJUST, etc do.
$ perl -v | grep 'This is'
This is perl 5, version 40, subversion 0 (v5.40.0) built for x86_64-linux-thread-multi
$ perl -e'use feature qw( class ); class Foo { }'
class is experimental at -e line 1.
$ perl -e'use feature qw( class ); field'
field is experimental at -e line 1.
Cannot 'field' outside of a 'class' at -e line 1.
$ perl -e'use feature qw( class ); ADJUST { }'
ADJUST is experimental at -e line 1.
Cannot 'ADJUST' outside of a 'class' at -e line 1.
$ perl -e'use feature qw( class ); __CLASS__'
Cannot use __CLASS__ outside of a method or field initializer expression at -e line 1.
It's moot since it can't be used outside of class and using class does warn, but it's inconsistent with other such keywords, and it could become important if class stops being experimental before __CLASS__.
The text was updated successfully, but these errors were encountered:
tags: 5.40.0 core class experimental warnings
__CLASS__
doesn't issue an warning identifying it as experimental likeclass
,field
,ADJUST
, etc do.It's moot since it can't be used outside of
class
and usingclass
does warn, but it's inconsistent with other such keywords, and it could become important ifclass
stops being experimental before__CLASS__
.The text was updated successfully, but these errors were encountered: