Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Inconsistent find_global 'not found' handling

0 views
Skip to first unread message

Bob Rogers

unread,
Jun 6, 2006, 10:53:35 PM6/6/06
to perl6-i...@perl.org
If given a namespace key with a single component, and a name that is
not found, e.g.

$P2 = find_global ["Foo"], "bazz"

Parrot says "Global 'bazz' not found", obeying
PARROT_ERRORS_GLOBALS_FLAG (presumably). On the other hand, if the
namespace name is compound:

$P2 = find_global ["Foo";"Bar"], "bazz"

find_global just returns the null PMC, ignoring
PARROT_ERRORS_GLOBALS_FLAG. I'm not exactly sure why -- compile-time
constant folding of the key? -- but the attached patch makes the latter
code also throw an error. If nobody objects in the next day, I will
commit it.

-- Bob Rogers
http://rgrjr.dyndns.org/

find-global-not-found.patch
0 new messages