Reflection/List properties: Difference between revisions

Content deleted Content added
add Perl 6
Line 143: Line 143:
=={{header|Perl 6}}==
=={{header|Perl 6}}==


You can get a list of an object's attributes (instance variables) using <tt>.^attributes</tt>.<br>
You can get a list of an object's attributes (instance variables) using <tt>.^attributes</tt>, which is part of the [https://docs.perl6.org/type/Metamodel$COLON$COLONClassHOW Meta Object Protocol]..<br>
Each is represented as an <tt>Attribute</tt> object that contains a bunch of info:
Each is represented as an <tt>Attribute</tt> object that contains a bunch of info: