Today I tried to run an old program using my new perl (5.15.7) and my
new PDL (2.4.10) and had an error regarding the use of subroutines as
lvalues. A simple example is
#!/usr/bin/env perl
use strict; use warnings;
use PDL; use PDL::NiceSlice;
my $a=zeroes(5,5);
$a(2,2).=1;
The error message is "Can't modify non-lvalue subroutine call" at the
last line. If I replace the line by "$a->nslice(2,2).=1;" the error
remains. If I replace it by "$a->slice('2,2');" it goes away, as it
does if I use a temporary variable. Nevertheless, I get a '1' if I "print
PDL::Lvalue->subs('slice');" and also if I "print
PDL::Lvalue->subs('nslice');". The code used to work. I wonder if
something changed in PDL or in perl or if I made some mistake when
configuring/compiling them.
Thanks and best regards,
Luis
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl