Front page | perl.perl5.porters |
Postings from August 2010
Re: mauve::reftype()
Thread Previous
|
Thread Next
From:
Zsbán Ambrus
Date:
August 30, 2010 04:19
Subject:
Re: mauve::reftype()
Message ID:
AANLkTikeonc+Dub_9kA=94oaOrNBi2XzXomLNbk4BLUG@mail.gmail.com
On Mon, Aug 30, 2010 at 12:51 PM, demerphq <demerphq@gmail.com> wrote:
> BIND, VSTRING and LVALUE lack an "example", and the others could have
> their "examples" reviewed.
The examples confuse me because C<< *STDOUT{IO} >> returns a reference
to IO, whereas C<< $code->() >> uses up a reference (it won't even
autovivify one).
Here are my suggestions. All of these create a reference, and they
also try to imply which ones are really scalar refs even where that
complicates the code.
SCALAR (C<< \$x >>)
REF (C<< \($x = \1) >>)
LVALUE (C<< (&{sub { *x = \$_[0] }}(substr("",0)), \$x) >>)
VSTRING (C<< \($x = v1.0.0) >>)
GLOB (C<< \($x = *y) >>)
ARRAY (C<< \@x >>)
HASH (C<< \%x >>)
CODE (C<< \&x >>)
FORMAT (C<< (eval "format =\n.", *STDOUT{FORMAT}) >>)
IO (C<< *STDOUT{IO} >>)
BIND -- I don't know what these were or are
REGEX (C<< qr// >>)
UNKNOWN -- there should be no example
Ambrus
Thread Previous
|
Thread Next