I've started implementing pdd21, but I got some more questions:
$P0 = find_global $P1, $S0
$P0 = find_global $S0
Find the variable $S0 in $P1 or the current namespace.
What about subroutines? Or should it return whatever is stored under the
given name?
Compile-time Creation
...
.HLL "Perl5", "perl5_group"
.namespace [ "Foo" ]
...
store_global "$x", $P0
.end
In this case, the "main" sub would be tied to Perl5 by the
".HLL" directive, so a Perl5 namespace would be created.
As this is storing into the current namespace, which I presume is
'Perl5::Foo', this would be equivalent to: '$Perl5::Foo::x'? That is the
'.HLL' automagically selects everything being in 'Perl5' namespace here.
Run-time Creation
...
store_global $P2, $S0, $P3
This is the same variable as above, but the 'store_global' with an
explicit namespace. As the namespace is now absolute, wouldn't that need
unshift $P2, 'Perl5'
before the 'store_global'? Or is the languages namespace prepended
automatically? How can some HLL access a different HLL namespace then?
Thanks for comments,
leo