The quick solution is to do say "no PDL::NiceSlice", i.e. something like this:
use PDL::NiceSlice; ... PDL code here ... no PDL::NiceSlice; my $result = $subref->($first_arg, $second_arg); use PDL::NiceSlice; ... etc ... I know: less than ideal. Actually, that has me thinking. I wonder if we could configure PDL::NiceSlice to take an optional parameter to prevent this sort of thing, like: use PDL::NIceSlice -noderef; and/or something like this no PDL::NiceSlice -deref; (I think you can do that without quotes, but if I'm wrong, then of course we would simply quote those things words, and probably drop the leading dash.) CHM, what do you think? Doable? David On Mon, Nov 4, 2013 at 9:12 PM, mraptor <[email protected]> wrote: > Have a package in which I have to use PDL::NiceSlice and also have a > closure ( which I call like this $it->() ), but this conflict with > NiceSlice...:( > > How to solve that.. > I'm getting similar problem for the second time.. first was when I had > a attribute was called 'stats', renaming it to 'xstats' solved my > problem, but in this case it is different. > > >> Can't call method "nslice" on unblessed reference .... > > _______________________________________________ > Perldl mailing list > [email protected] > http://mailman.jach.hawaii.edu/mailman/listinfo/perldl > -- "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." -- Brian Kernighan
_______________________________________________ Perldl mailing list [email protected] http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
