Also: it looks like the my variables there are essentially "class static" members — so called in other languages e.g. C#. Is that an accurate characterization?
Pretty much yes. There is a discussion whether the class system needs its own syntax for "class static" members, but this is about convenience details which are not yet implemented: A "field" in Object::Pad can get attributes like :reader which will create appropriate accessor functions. You might want to permit a field $foo :static :reader, but there was some opposition against my $foo :reader which would make the syntax of the existing my keyword depend on the context. Damian Conway points out that a my variable is a private implementation detail, but a static field with a reader is part of the class interface (and maybe subject to inheritance). As far as Perl 5.38 is concerned, the distinction doesn't exist.
In reply to Re: perl 5.38: can the body of a class declaration contain arbitrary code?
by haj
in thread perl 5.38: can the body of a class declaration contain arbitrary code?
by jdporter
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |