On Tue, Feb 07, 2006 at 03:28:05PM -0800, Larry Wall wrote:
: say $::<You can already do that!>;

Or you can use a symbolic ref with a constant string:

    $::('x y');

The compiler knows it's a constant.  And it's even implemented in Pugs.

But my thinking on the ::<> form is that it derives from the symbol
table as hash forms:

    $MY::{'x y'}
    $MY::<x y>          # same thing
    MY::<$x y>          # same thing

    $GLOBAL::{'x y'}
    $GLOBAL::<x y>      # same thing
    GLOBAL::<$x y>      # same thing

but I was assuming some particular symbol table would be supplied if you
just specified a null symbol table, MY maybe.  If not, then you'd have
to say

    $MY::<x y>

or use the symblic ref form.

Or I suppose the null symbol table could mean to search each symbol
table in the same order you would for a bare $foo.  In other words,
there would be no difference between $foo and $::<foo> and ::<$foo>
(except you can't interpolate the last one in a string directly).

Larry

Reply via email to