This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Porting/todo.pod: Rmv ‘LVALUE functions for lists’
authorFather Chrysostomos <sprout@cpan.org>
Tue, 7 Jun 2016 05:25:19 +0000 (22:25 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 7 Jun 2016 05:25:19 +0000 (22:25 -0700)
$ ./perl -Ilib -e 'sub foo :lvalue{@hash{"foo","bar"}} (foo) = (3,4); use Data::Dumper; warn Dumper \%hash'
$VAR1 = {
          'foo' => 3,
          'bar' => 4
        };
$ ./perl -Ilib -e 'sub foo :lvalue{@arr[1,2]} (foo) = (3,4); use Data::Dumper; warn Dumper \@arr'
$VAR1 = [
          undef,
          3,
          4
        ];

Apparently slices do work.

Porting/todo.pod

index 484b187..6d1e6f2 100644 (file)
@@ -942,11 +942,6 @@ program if you pass the process ID. It would be good to do this with the Perl
 debugger on a running Perl program, although I'm not sure how it would be
 done." ssh and screen do this with named pipes in /tmp. Maybe we can too.
 
-=head2 LVALUE functions for lists
-
-The old perltodo notes that lvalue functions don't work for list or hash
-slices. This would be good to fix.
-
 =head2 regexp optimizer optional
 
 The regexp optimizer is not optional. It should be configurable to be optional