You can make something execute at compile time using BEGIN. From what you say, the following would work:
BEGIN { # this line starts in column 0, and seems like runtime assignment *ID = \&Scalar::Util::refaddr; # the same for these, later: *_extract_default = _extractor_for_pair_named('default'); *_extract_init_arg = _extractor_for_pair_named('init_arg'); *_extract_get = _extractor_for_pair_named('get'); *_extract_set = _extractor_for_pair_named('set'); } # later, in Class::Std::SCR... my %values_of : ATTR ( :init_arg<values> );
In reply to Re: Class::Std, 5.6.1, and AUTOLOAD
by ikegami
in thread Class::Std, 5.6.1, and AUTOLOAD
by rjbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |