Replies: 2 comments 2 replies
-
I think the flag for ro/wo/rw( or reader/writer) is needed. |
Beta Was this translation helpful? Give feedback.
-
Current Implementation (2022-08-17)A field is a padname stored in a pad (most likely the toplevel code-less scope of its containing file), with additionally the In that case, the PADOFFSET fieldix; /* index of this field within ObjectFIELDS() array */
HV *fieldstash; /* original class package which added this field */ These fields:
APIFields are created by passing the PADOFFSET padix = pad_add_name_pvn("$x", 2, padadd_FIELD, NULL, NULL); There is no need to additionally call There is currently no introspection API for callers to ask about fields within a class. For that, code would just directly inspect the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How should fields of classes be represented?
There isn't a convenient precedent yet for this concept. About the closest thing that exists is the pad names elements; the SVs that exist in the PADNAMES array of a padlist. Those are just regular SVs that store the name of the lexical variable in the PV slot, and maybe have a few extra fields set on them.
A field of a class, meanwhile, would need some more data:
:param
attributeBeta Was this translation helpful? Give feedback.
All reactions