Hi, while responding to nothingmuch++'s post "function signatures?", I thought that it'll be great if Code objects were fully introspectable.
I.e.: &foo.statements; # List of statements &foo.statements[0] # First statement &foo.statements[2] = ...; # Statement modification? And all objects returned from the introspection methods should stringify appropriately, so that... say ~sub { 42 + $^a }; # prints sub ($a) { return 42 + $a; } Is this going too far? Is this wanted? Is it useful? (At least readonly access would be nice, as allowing writes to &foo.statements will make compiler optimisations much harder/impossible.) --Ingo -- Linux, the choice of a GNU | self-reference, n. - See self-reference generation on a dual AMD | Athlon! |