Togos <[EMAIL PROTECTED]> wrote: > This is because it doesn't know if the global 'thingy' > al;ready exists, and if it doesn't, the Undef that > find_global returns won't actually be stored in the > symbol table.
It should be stored in the stash probably, but the PerlHash PMC doesn't do that. There was some discussion about that issue. > find_or_create_global $P0, "thingy" > that would store the returned Undef in the symbol > table if it didn't already exist. > Is this a good idea? I can write the patch. I think that would be ok. BTW here is another way to test for the existacne of a global: getinterp P0 set P1, P0[-1] # get stash exists I0, P1["foo"] print I0 new P2, .PerlInt store_global "foo", P2 exists I0, P1["foo"] print I0 print "\n" # prints "01" end leo