Ticket #1473 (closed bug: fixed)
Handle PMC type is broken
Reported by: | Austin_Hastings | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | core | Version: | 2.1.0 |
Severity: | medium | Keywords: | |
Cc: | Language: | ||
Patch status: | Platform: |
Description
Despite being an abstract class, there are reasons to talk to the Handle PMC type. For example, to ask for a list of (inherited) methods or attributes, or to display it when using data::dumper on a (sub) class that includes Handle as a parent. Sadly, queries via the 'does' opcode are fatal:
austin@andLinux:~/kakapo$ cat test.pir .sub foo $P0 = get_class 'Handle' $I0 = does $P0, 'hash' .end austin@andLinux:~/kakapo$ parrot test.pir Handle cannot be instantiated directly. current instr.: 'foo' pc 3 (test.pir:4)
Note that the "does $P0, 'hash'" query is straight from Data::Dumper::Base - you can't dump the FileHandle or StringHandle class PMCs because of this.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.