Sigh. This is the problem with reduced testcases. When I post them, I get
asked "why did you write the code like that"? In my original code, I define
a subroutine and call it just in the code I show. When I do not use slices,
I do not get an error and get the expected results. When I do use slices, I
do get the error. I reduced the code to the testcase I posted.

I suppose I could post the original code.

Steve


-----Original Message-----
From: Jarle Brinchmann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 29, 2007 9:46 AM
To: Steve Chapel
Cc: [email protected]
Subject: Re: [Perldl] Can't call method "nslice" on unblessed reference 

Hi Steve

> my $s = sub { 1; };
> my $x = sum($a->slice("0:0,1"));
> $s->($x);

It isn't clear to me what you intend to do here - $s is reference to a 
subroutine so -> cannot act on this (which is why you get the error). 
What is the intention with the code?

                                Cheers,
                                        Jarle.



_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to