#743: Add 'inspect' method to Sub PMC
-----------------------------------+----------------------------------------
Reporter: Austin_Hastings | Type: todo
Status: new | Priority: minor
Milestone: | Component: none
Version: 1.2.0 | Severity: high
Keywords: pmc,sub,introspection | Lang:
Patch: | Platform: linux
-----------------------------------+----------------------------------------
Presently, Sub PMC has `inspect()` and `inspect_str()` functions defined,
but method calls on the PMC from PIR are non-responsive:
{{{
Method 'inspect' not found for invocant of class 'Sub'
}}}
To reproduce:
{{{
.namespace []
.sub demo :init :load
$P0 = get_global 'demo'
print "Sub type: "
$S0 = typeof $P0
print $S0
print "\n"
$P1 = $P0.'get_namespace'()
$S0 = $P1
print "Namespace: "
print $S0
print "\n"
$P2 = $P0.'inspect'()
.local pmc iter
iter = new 'Iterator', $P2
while:
unless iter, done
$S0 = shift iter
print $S0
print ": "
$P3 = iter[$S0]
print $P3
print "\n"
goto while
done:
.end
}}}
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/743>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets