Hi, Zentara,
The perl lvalue sub bug involves assignments to $b, and is only
stimulated in the debugger. You need to try:
perl -d
use PDL;
$a = sequence(10);
$a->nslice([0,4]) .= 2;
print $a;
(note '-d' and computed lvalue) to test the bug. Under Perl 5.8.8,
this prints
[2 2 2 2 2 5 6 7 8 9]
along with all the other stuff to come out of the debugger. Under
Perl 5.10.x it throws an error because the debugger does not recognize
implicit lvalue subs, and nslice() is being treated as an lvalue. It
would be great if 5.12.2 solves the problem -- then the Perl-side
mistake will gradually roll off the books...
On Nov 1, 2010, at 9:57 AM, zentara wrote:
> On Mon, 1 Nov 2010 09:08:07 -0600 (MDT)
> Doug Hunt <[email protected]> wrote:
>
>> Hi Chris: I noticed that the most recent perl (5.12.2) mentions that
>> there is a bug fix regarding lvalue subs in the debugger. I'm
>> hoping this
>> will solve the problem, but I'm still having troubles getting it
>> installed. Once I figure this install problem out, I'll let you
>> know if
>> it fixes the lvalue sub debugging problem.
>>
>> Regards,
>> Doug
>
> Hi, I have PDL on
> perl5 (revision 5 version 12 subversion 2)
>
> and it seems to work fine
>
> #!/usr/bin/perl
> use PDL;
> $a = sequence(10);
> $b = $a->nslice([0,4]);
> print $b;
>
> Output:
> $ ./ztest
> [0 1 2 3 4]
>
> hope it helps,
> zentara
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
>
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl