Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Data-Alias CPAN distribution.

Report information
The Basics
Id: 107232
Status: new
Priority: 0/
Queue: Data-Alias

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Documentation of 'map'
Download (untitled) / with headers
text/plain 482b
It appears that alias cannot be used with map: my @a = ([1], [2], [3]); alias my @b = map { $_->[0] } @a; ++$_->[0] foreach @b; say $_->[0] foreach @a; The map makes sure you get a copy not an alias. And I don't think you can work around it by putting alias inside the map block. You have to use foreach instead: my @b; alias push @b, $_->[0] foreach @a; If this is correct, it would be useful to note it in the documentation. (Also the behaviour of grep)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.