Index: src/ops/experimental.ops =================================================================== --- src/ops/experimental.ops (revision 12894) +++ src/ops/experimental.ops (working copy) @@ -276,7 +276,7 @@ } op find_global(out PMC, in KEY, in STR) { - $1 = Parrot_find_global_p(interpreter, $2, $3); + $1 = Parrot_get_global_p(interpreter, $2, $3); goto NEXT(); } Index: t/pmc/namespace.t =================================================================== --- t/pmc/namespace.t (revision 12894) +++ t/pmc/namespace.t (working copy) @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 29; +use Parrot::Test tests => 31; use Parrot::Config; =head1 NAME @@ -155,6 +155,27 @@ baz OUTPUT +pir_output_like(<<'CODE', <<'OUTPUT', "find_global Foo::bazz not found"); +.sub 'main' :main + $P2 = find_global ["Foo"], "bazz" + $P2() + print "ok\n" +.end +CODE +/Global 'bazz' not found/ +OUTPUT + +# [this used to behave differently from the previous case.] +pir_output_like(<<'CODE', <<'OUTPUT', "find_global Foo::Bar::bazz not found"); +.sub 'main' :main + $P2 = find_global ["Foo";"Bar"], "bazz" + $P2() + print "ok\n" +.end +CODE +/Global 'bazz' not found/ +OUTPUT + pir_output_is(<<'CODE', <<'OUTPUT', "find_global Foo::Bar::baz hash"); .sub 'main' :main $P0 = find_global "Foo"