# New Ticket Created by Klaas-Jan Stol # Please include the string: [perl #50508] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=50508 >
hi, earlier today I sent a proposal to add a :scope type ('attribute') to PAST::Var nodes. As it turnes out, Jonathan++ already implemented this. However, the emitted set/getattribute only work on the "self" object. Attached is a patch that evaluates the first child of a PAST::Var( :scope('attribute') ) node as the object on which the attribute is get/set. The idea is, if there's a child node, evaluate that as the object, if it's not there, assume 'self'. This is my first hack on the PAST compiler, so I didn't commit this myself. One possible future improvement may be to add a :vivibase attribute to the PAST::Var(:scope('attribute')) nodes, but then again, you might as well set the :viviself attribute on the PAST object representing the object. So never mind that :-) kjs
attribute_scope_fix_object.patch
Description: Binary data