Open p5pRT opened 7 years ago
It would be very nice to be able to use the refalias feature in combination with subroutine signatures. On 5.24.1\, the following is a syntax error:
use feature 'refaliasing'; use feature 'signatures'; sub test ($scalar\, \@array\, \%hash) { }
The following of course works and has the same intended meaning:
use feature 'refaliasing'; sub test { (my $scalar\, \my @array\, \my %hash) = @_; }
Probably intimately related to refalias + signatures is that the following is also a syntax error:
use feature 'refaliasing'; sub test { my ($scalar\, \@array\, \%hash) = @_; }
I\, too\, would like to see refaliasing via subroutine signatures.
There is or was another ticket related to being able to put the \ on the inside of my declarations. I believe sprout did some work on that front.
-- rjbs
The RT System itself - Status changed from 'new' to 'open'
On Tue\, 21 Mar 2017 06:08:14 -0700\, rjbs wrote:
I\, too\, would like to see refaliasing via subroutine signatures.
There is or was another ticket related to being able to put the \ on the inside of my declarations. I believe sprout did some work on that front.
In 5.26-to-be\, you can use the ādeclared_refsā feature to allow my(\%foo). I honestly donāt remember whether I got as far as applying it to signatures. I donāt think so. I am too lazy to build blead to find out.
--
Father Chrysostomos
On Tue\, Mar 21\, 2017 at 05:43:32PM -0700\, Father Chrysostomos via RT wrote:
In 5.26-to-be\, you can use the ādeclared_refsā feature to allow my(\%foo). I honestly donāt remember whether I got as far as applying it to signatures. I donāt think so. I am too lazy to build blead to find out.
I suggested holding off\, as I was working on signatures at the time\, and probably wanted to do things a bit differently.
-- I don't want to achieve immortality through my work... I want to achieve it through not dying. -- Woody Allen
On Wed\, 22 Mar 2017\, at 00:43\, Father Chrysostomos via RT wrote:
In 5.26-to-be\, you can use the ādeclared_refsā feature to allow my(\%foo). I honestly donāt remember whether I got as far as applying it to signatures. I donāt think so. I am too lazy to build blead to find out.
Oh\, that's fantastic! If declared_refs doesn't do it for signatures in 5.26\, I don't mind at all waiting for 5.28.
(For years at $work\, I've been documenting function return values using my (\@foo\, \%bar) and so on. It's very nice to find it will be a real feature.)
Regards\, Ville Koskinen
Migrated from rt.perl.org#130971 (status was 'open')
Searchable as RT130971$