develooper Front page | perl.perl6.language | Postings from February 2006

Re: tokenizer hints, supporting delimited identifiers or symbols

Thread Previous | Thread Next
From:
Larry Wall
Date:
February 7, 2006 15:54
Subject:
Re: tokenizer hints, supporting delimited identifiers or symbols
Message ID:
20060207235407.GA31801@wall.org
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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About