package MyClass; our $total_objects; our $public_static_class_data; my $private_static_class_data; # For example: sub new { # ... $total_objects++; # ... }
In Perl 6, the above would work if you replace package with class (though in general you don't write a new method yourself in Perl 6).
In reply to Re: class static member
by gaal
in thread class static member
by be12dune09a
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |