# New Ticket Created by François PERRAD # Please include the string: [perl #57668] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57668 >
The patch contains a test case that exhibits the problem. François.
Index: t/pmc/namespace.t =================================================================== --- t/pmc/namespace.t (revision 30051) +++ t/pmc/namespace.t (working copy) @@ -1736,6 +1736,36 @@ /Null PMC access in get_string()/ OUT +pir_output_is( <<'CODE', <<OUT, "iterate through a NameSpace PMC" ); +.namespace [ 'bar' ] + +.sub 'main' :main + $P0 = get_namespace + say $P0 + $I0 = elements $P0 + say $I0 + new $P1 , 'Iterator', $P0 + L1: + unless $P1 goto L2 + $P2 = shift $P1 + say $P2 + goto L1 + L2: + say 'OK' +.end + +.sub 'foo' + say 'foo' +.end +CODE +bar +2 +main +foo +OK +OUT + + # Local Variables: # mode: cperl # cperl-indent-level: 4