Re: RFC 132 (v1) subroutines should be able to return an lvalue
[email protected] (Tom Christiansen) Tue, 22 Aug 2000 12:32:30 -0600
| Newsgroups | perl.perl6.language.subs |
|---|---|
| Message-ID | <5579.966969150@chthon> |
>[Quoting David L. Nicol, on August 21 2000, 23:06, in "Re: RFC 132 (v1) sub"]
>> Looks like a case for automatic dereferencing!
>Which Perl has always stated it would _never_ do.
Kinda.
To be honest, Perl does do autoderef in at least two places.
1.
$fh = *FH;
$fh = \*FH
can be used equivalently, because a typeglob ref is autodereffed
as need be in I/O operations. (Not to mention *FH{IO}, even.)
2. bless doesn't bless the reference passed, but its underlying referent,
doing an autoderef to find the referent.
and maybe
3.
$glob = 'SYM';
$glob = *SYM;
are equivalent.
--tom