Front page | perl.perl5.porters |
Postings from August 2010
Re: mauve::reftype()
Thread Previous
|
Thread Next
From:
Ben Morrow
Date:
August 30, 2010 05:16
Subject:
Re: mauve::reftype()
Message ID:
20100830121628.GA85817@osiris.mauzo.dyndns.org
Quoth ambrus@math.bme.hu:
>
> LVALUE (C<< (&{sub { *x = \$_[0] }}(substr("",0)), \$x) >>)
It doesn't need to be that complicated. \substr("", 0) will do just
fine. I don't think it's worth trying to include a '\$x' where it adds
that much complication.
> GLOB (C<< \($x = *y) >>)
I presume you included $x in the example because you think this is
'really' a SCALAR ref? I disagree. Globrefs are different from scalar
refs in important ways; apart from anything else, they've got their own
deref operator.
> BIND -- I don't know what these were or are
Will be. The intention is (or was) to use this SvTYPE for read-only
aliases, as in Perl 6. IIRC Chip was working on an implementation, but I
haven't seen anything about it for quite a while.
> REGEX (C<< qr// >>)
A REGEX, OTOH, could reasonably be considered a SCALAR ref. It's derefed
with $, the result fits in a scalar variable, &c.
Ben
Thread Previous
|
Thread Next